mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2025-01-10 21:13:51 +08:00
btrfs-progs: remove dead code that checks null eb
'next' can never be non-null in the body of these loops. It's initialized to NULL and the loop is terminated the moment it is set. Signed-off-by: Zach Brown <zab@redhat.com>
This commit is contained in:
parent
ba4791fde3
commit
5fc2413e64
6
ctree.c
6
ctree.c
@ -2872,9 +2872,6 @@ int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path)
|
||||
}
|
||||
slot--;
|
||||
|
||||
if (next)
|
||||
free_extent_buffer(next);
|
||||
|
||||
next = read_node_slot(root, c, slot);
|
||||
break;
|
||||
}
|
||||
@ -2920,9 +2917,6 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next)
|
||||
free_extent_buffer(next);
|
||||
|
||||
if (path->reada)
|
||||
reada_for_search(root, path, level, slot, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user