summaryrefslogtreecommitdiff
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-04-04 02:00:17 +0200
committerDavid Sterba <dsterba@suse.com>2019-02-25 14:13:27 +0100
commit300aa896e1199bcd0dfb61aae86356714e017355 (patch)
tree00235669e8fac6f0f87c1293ab56cc015a9cf7c6 /fs/btrfs/backref.c
parentaa12c02778a9719283fc3c32cfe5cffb902a7685 (diff)
btrfs: replace btrfs_set_lock_blocking_rw with appropriate helpers
We can use the right helper where the lock type is a fixed parameter. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 78556447e1d5..136454dbb4af 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1289,7 +1289,7 @@ again:
goto out;
}
btrfs_tree_read_lock(eb);
- btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
+ btrfs_set_lock_blocking_read(eb);
ret = find_extent_in_eb(eb, bytenr,
*extent_item_pos, &eie, ignore_offset);
btrfs_tree_read_unlock_blocking(eb);
@@ -1650,7 +1650,7 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path,
/* make sure we can use eb after releasing the path */
if (eb != eb_in) {
if (!path->skip_locking)
- btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
+ btrfs_set_lock_blocking_read(eb);
path->nodes[0] = NULL;
path->locks[0] = 0;
}