diff options
author | David Sterba <dsterba@suse.com> | 2017-02-13 14:24:35 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-17 12:03:50 +0100 |
commit | 0b08e1f4f7b7af719500f5f37a60c342ba812f69 (patch) | |
tree | 6d33e34f0a1671b9b1328b993303fda88dca5c26 /fs/btrfs/qgroup.c | |
parent | btrfs: remove unnecessary mutex lock in qgroup_account_snapshot (diff) | |
download | linux-0b08e1f4f7b7af719500f5f37a60c342ba812f69.tar.xz linux-0b08e1f4f7b7af719500f5f37a60c342ba812f69.zip |
btrfs: qgroups: opencode qgroup_free helper
The helper name is not too helpful and is just wrapping a simple call.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/qgroup.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 0d3c9a1062b0..c6bf886f15b4 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -2465,11 +2465,6 @@ out: spin_unlock(&fs_info->qgroup_lock); } -static inline void qgroup_free(struct btrfs_root *root, u64 num_bytes) -{ - return btrfs_qgroup_free_refroot(root->fs_info, root->objectid, - num_bytes); -} void assert_qgroups_uptodate(struct btrfs_trans_handle *trans) { if (list_empty(&trans->qgroup_ref_list) && !trans->delayed_ref_elem.seq) @@ -2870,7 +2865,9 @@ static int __btrfs_qgroup_release_data(struct inode *inode, u64 start, u64 len, goto out; if (free) { - qgroup_free(BTRFS_I(inode)->root, changeset.bytes_changed); + btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, + BTRFS_I(inode)->root->objectid, + changeset.bytes_changed); trace_op = QGROUP_FREE; } trace_btrfs_qgroup_release_data(inode, start, len, @@ -2945,7 +2942,7 @@ void btrfs_qgroup_free_meta_all(struct btrfs_root *root) reserved = atomic_xchg(&root->qgroup_meta_rsv, 0); if (reserved == 0) return; - qgroup_free(root, reserved); + btrfs_qgroup_free_refroot(fs_info, root->objectid, reserved); } void btrfs_qgroup_free_meta(struct btrfs_root *root, int num_bytes) @@ -2959,7 +2956,7 @@ void btrfs_qgroup_free_meta(struct btrfs_root *root, int num_bytes) BUG_ON(num_bytes != round_down(num_bytes, fs_info->nodesize)); WARN_ON(atomic_read(&root->qgroup_meta_rsv) < num_bytes); atomic_sub(num_bytes, &root->qgroup_meta_rsv); - qgroup_free(root, num_bytes); + btrfs_qgroup_free_refroot(fs_info, root->objectid, num_bytes); } /* @@ -2986,7 +2983,10 @@ void btrfs_qgroup_check_reserved_leak(struct inode *inode) "leaking qgroup reserved space, ino: %lu, start: %llu, end: %llu", inode->i_ino, unode->val, unode->aux); } - qgroup_free(BTRFS_I(inode)->root, changeset.bytes_changed); + btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, + BTRFS_I(inode)->root->objectid, + changeset.bytes_changed); + } ulist_fini(&changeset.range_changed); } |