From 08dfef4fbdbfcd06a7a2c8743d9dcba6fa84d747 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 30 Dec 2014 15:16:17 +0100 Subject: [PATCH] btrfs-progs: fix overflow check in btrfs_insert_inode_ref Resolves-coverity-id: 1260247 Signed-off-by: David Sterba --- inode-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inode-item.c b/inode-item.c index 993f3091..522d25a4 100644 --- a/inode-item.c +++ b/inode-item.c @@ -89,7 +89,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, ptr = (unsigned long)(ref + 1); ret = 0; } else if (ret < 0) { - if (ret == EOVERFLOW) + if (ret == -EOVERFLOW) ret = -EMLINK; goto out; } else {