Skip to content

Commit d80bb3f

Browse files
liubogithubkdave
authored andcommitted
Btrfs: remove always true check in unlock_up
As unlock_up() is written as for () { if (!path->locks[i]) break; ... if (... && path->locks[i]) { } } Apparently, @path->locks[i] is always true at this 'if'. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com> Reviewed-by: David Sterba <dsterba@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 662c653 commit d80bb3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/ctree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ static noinline void unlock_up(struct btrfs_path *path, int level,
23302330
no_skips = 1;
23312331

23322332
t = path->nodes[i];
2333-
if (i >= lowest_unlock && i > skip_level && path->locks[i]) {
2333+
if (i >= lowest_unlock && i > skip_level) {
23342334
btrfs_tree_unlock_rw(t, path->locks[i]);
23352335
path->locks[i] = 0;
23362336
if (write_lock_level &&

0 commit comments

Comments
 (0)