OSDN Git Service

btrfs: cleanup the locking in btrfs_next_old_leaf
authorJosef Bacik <josef@toxicpanda.com>
Fri, 6 Nov 2020 21:27:29 +0000 (16:27 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:09 +0000 (15:54 +0100)
commitffeb03cfe2b49b73da7b325a31714003761fc6d5
treeeb17a367e927525f16a9b81783c45b7665568bb5
parentb2598edf8b36f8b7c52e3f5f611c49cbd1c67b36
btrfs: cleanup the locking in btrfs_next_old_leaf

We are carrying around this next_rw_lock from when we would do spinning
vs blocking read locks.  Now that we have the rwsem locking we can
simply use the read lock flag unconditionally and the read lock helpers.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c