diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-01-29 17:07:05 -0500 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2020-02-14 10:04:06 -0500 |
commit | 05b19a942e227375864ddf21cf5b4e71d3dbe11b (patch) | |
tree | d3b1911010e85809d6fbbd9d0f8018bff5c08672 | |
parent | 8d36190269d7a038036ae5e1ed13b359b8ca7e23 (diff) | |
download | btrfs-next-05b19a942e227375864ddf21cf5b4e71d3dbe11b.tar.gz |
btrfs: use the btrfs_space_info_free_bytes_may_use helper for delalloc
We are going to use the ticket infrastructure for data, so use the
btrfs_space_info_free_bytes_may_use() helper in
btrfs_free_reserved_data_space_noquota() so we get the
try_granting_tickets call when we free our reservation.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
-rw-r--r-- | fs/btrfs/delalloc-space.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/delalloc-space.c b/fs/btrfs/delalloc-space.c index f23d07a981e43b..13decc33520a96 100644 --- a/fs/btrfs/delalloc-space.c +++ b/fs/btrfs/delalloc-space.c @@ -281,9 +281,7 @@ void btrfs_free_reserved_data_space_noquota(struct inode *inode, u64 start, start = round_down(start, fs_info->sectorsize); data_sinfo = fs_info->data_sinfo; - spin_lock(&data_sinfo->lock); - btrfs_space_info_update_bytes_may_use(fs_info, data_sinfo, -len); - spin_unlock(&data_sinfo->lock); + btrfs_space_info_free_bytes_may_use(fs_info, data_sinfo, len); } /* |