diff mbox

[8/9] Btrfs-progs: remove the unnecessary 'return -1;' at the end of bin_search

Message ID 1367010370-21571-9-git-send-email-sandeen@redhat.com (mailing list archive)
State Under Review, archived
Headers show

Commit Message

Eric Sandeen April 26, 2013, 9:06 p.m. UTC
The code path should not reach there. Remove it.

[Eric Sandeen: port kernel commit 3fed40c to userspace]

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 ctree.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/ctree.c b/ctree.c
index b7b12a3..7257e6f 100644
--- a/ctree.c
+++ b/ctree.c
@@ -579,20 +579,18 @@  static int generic_bin_search(struct extent_buffer *eb, unsigned long p,
 static int bin_search(struct extent_buffer *eb, struct btrfs_key *key,
 		      int level, int *slot)
 {
-	if (level == 0) {
+	if (level == 0)
 		return generic_bin_search(eb,
 					  offsetof(struct btrfs_leaf, items),
 					  sizeof(struct btrfs_item),
 					  key, btrfs_header_nritems(eb),
 					  slot);
-	} else {
+	else
 		return generic_bin_search(eb,
 					  offsetof(struct btrfs_node, ptrs),
 					  sizeof(struct btrfs_key_ptr),
 					  key, btrfs_header_nritems(eb),
 					  slot);
-	}
-	return -1;
 }
 
 static noinline struct extent_buffer *read_node_slot(struct btrfs_root *root,