[PATCH] btrfs: remove unnecessary if judge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since add_excluded_extent always returns 0,
no need to judge ret.

Signed-off-by: Gu Jinxiang <gujx@xxxxxxxxxxxxxx>
---
 fs/btrfs/extent-tree.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 75cfb80d2551..4d876b32e136 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -249,8 +249,6 @@ static int exclude_super_stripes(struct btrfs_fs_info *fs_info,
 		cache->bytes_super += stripe_len;
 		ret = add_excluded_extent(fs_info, cache->key.objectid,
 					  stripe_len);
-		if (ret)
-			return ret;
 	}
 
 	for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
@@ -282,10 +280,6 @@ static int exclude_super_stripes(struct btrfs_fs_info *fs_info,
 
 			cache->bytes_super += len;
 			ret = add_excluded_extent(fs_info, start, len);
-			if (ret) {
-				kfree(logical);
-				return ret;
-			}
 		}
 
 		kfree(logical);
-- 
1.9.1



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux