diff mbox

[15/18] btrfs: cleanup redundant code in btrfs_search_forward()

Message ID 4BAB58DA.90904@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Miao Xie March 25, 2010, 12:36 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 4f258ba..e466add 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -3995,10 +3995,9 @@  again:
 	path->nodes[level] = cur;
 	path->locks[level] = 1;
 
-	if (btrfs_header_generation(cur) < min_trans) {
-		ret = 1;
+	if (btrfs_header_generation(cur) < min_trans)
 		goto out;
-	}
+
 	while (1) {
 		nritems = btrfs_header_nritems(cur);
 		level = btrfs_header_level(cur);
@@ -4037,10 +4036,8 @@  again:
 
 			if (max_key) {
 				btrfs_node_key(cur, &disk_key, slot);
-				if (comp_keys(&disk_key, max_key) >= 0) {
-					ret = 1;
+				if (comp_keys(&disk_key, max_key) >= 0)
 					goto out;
-				}
 			}
 
 			tmp = btrfs_find_tree_block(root, blockptr,
@@ -4067,9 +4064,8 @@  find_next_key:
 			if (sret == 0) {
 				btrfs_release_path(root, path);
 				goto again;
-			} else {
+			} else
 				goto out;
-			}
 		}
 		/* save our key for returning back */
 		btrfs_node_key_to_cpu(cur, &found_key, slot);