summaryrefslogtreecommitdiff
path: root/fs/btrfs/reflink.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-02-11 01:14:34 +0300
committerDavid Sterba <dsterba@suse.com>2021-04-19 18:25:15 +0300
commit64708539cd23b31d0f235a2c12a0cf782f95908a (patch)
treebf6d2d0ce5f92896525cd1c4f0048af8a7179ee6 /fs/btrfs/reflink.c
parent8318ba79eeeb1ab69bea1cc4386d5a185abc0cb8 (diff)
downloadlinux-64708539cd23b31d0f235a2c12a0cf782f95908a.tar.xz
btrfs: use btrfs_inode_lock/btrfs_inode_unlock inode lock helpers
A few places we intermix btrfs_inode_lock with a inode_unlock, and some places we just use inode_lock/inode_unlock instead of btrfs_inode_lock. None of these places are using this incorrectly, but as we adjust some of these callers it would be nice to keep everything consistent, so convert everybody to use btrfs_inode_lock/btrfs_inode_unlock. 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>
Diffstat (limited to 'fs/btrfs/reflink.c')
-rw-r--r--fs/btrfs/reflink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
index 9ebe95cc355b..d60ea7ea5f27 100644
--- a/fs/btrfs/reflink.c
+++ b/fs/btrfs/reflink.c
@@ -833,7 +833,7 @@ loff_t btrfs_remap_file_range(struct file *src_file, loff_t off,
return -EINVAL;
if (same_inode)
- inode_lock(src_inode);
+ btrfs_inode_lock(src_inode, 0);
else
lock_two_nondirectories(src_inode, dst_inode);
@@ -849,7 +849,7 @@ loff_t btrfs_remap_file_range(struct file *src_file, loff_t off,
out_unlock:
if (same_inode)
- inode_unlock(src_inode);
+ btrfs_inode_unlock(src_inode, 0);
else
unlock_two_nondirectories(src_inode, dst_inode);