From 628c8282bed73c18ff056d655d4a6a63ef55284a Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Mon, 18 Mar 2013 09:18:09 +0000 Subject: btrfs: Cleanup some redundant codes in btrfs_lookup_csums_range() Signed-off-by: Zhi Yong Wu Signed-off-by: Josef Bacik --- fs/btrfs/file-item.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fs/btrfs/file-item.c') diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index bc3c92466045..ad3cd8614d29 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -358,11 +358,8 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || - key.type != BTRFS_EXTENT_CSUM_KEY) - break; - - btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); - if (key.offset > end) + key.type != BTRFS_EXTENT_CSUM_KEY || + key.offset > end) break; if (key.offset > start) -- cgit v1.2.3