diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-02-11 01:14:34 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-04-19 18:25:15 +0300 |
commit | 64708539cd23b31d0f235a2c12a0cf782f95908a (patch) | |
tree | bf6d2d0ce5f92896525cd1c4f0048af8a7179ee6 /fs/btrfs/relocation.c | |
parent | 8318ba79eeeb1ab69bea1cc4386d5a185abc0cb8 (diff) | |
download | linux-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/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 232d5da7b7be..bf269ee17e68 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2578,7 +2578,7 @@ static noinline_for_stack int prealloc_file_extent_cluster( return btrfs_end_transaction(trans); } - inode_lock(&inode->vfs_inode); + btrfs_inode_lock(&inode->vfs_inode, 0); for (nr = 0; nr < cluster->nr; nr++) { start = cluster->boundary[nr] - offset; if (nr + 1 < cluster->nr) @@ -2596,7 +2596,7 @@ static noinline_for_stack int prealloc_file_extent_cluster( if (ret) break; } - inode_unlock(&inode->vfs_inode); + btrfs_inode_unlock(&inode->vfs_inode, 0); if (cur_offset < prealloc_end) btrfs_free_reserved_data_space_noquota(inode->root->fs_info, |