]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
btrfs: Drop fs_info parameter from btrfs_qgroup_account_extents
authorNikolay Borisov <nborisov@suse.com>
Thu, 15 Mar 2018 14:00:25 +0000 (16:00 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Mar 2018 23:41:10 +0000 (01:41 +0200)
It's provided by the transaction handle.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h
fs/btrfs/transaction.c

index 0fa4f07b80b83820c4e53cfee28ad92457f91445..569f9ab65ceb6b36503e4c43035d3194b58db6c5 100644 (file)
@@ -2014,9 +2014,9 @@ out_free:
        return ret;
 }
 
-int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans,
-                                struct btrfs_fs_info *fs_info)
+int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_qgroup_extent_record *record;
        struct btrfs_delayed_ref_root *delayed_refs;
        struct ulist *new_roots = NULL;
index d9984e87cddfcba3066e6755d3d6a72c96bc14ac..ad003483d20cd6d94c381beb7b9ebb5fe470cada 100644 (file)
@@ -220,8 +220,7 @@ btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans,
                            struct btrfs_fs_info *fs_info,
                            u64 bytenr, u64 num_bytes,
                            struct ulist *old_roots, struct ulist *new_roots);
-int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans,
-                                struct btrfs_fs_info *fs_info);
+int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans);
 int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
                      struct btrfs_fs_info *fs_info);
 int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
index 6534fab417ee8dac1b6abab501247ee32321dc4c..7c815885ac01f9cbdfab5cef85db065d33ced655 100644 (file)
@@ -1369,7 +1369,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
        ret = commit_fs_roots(trans);
        if (ret)
                goto out;
-       ret = btrfs_qgroup_account_extents(trans, fs_info);
+       ret = btrfs_qgroup_account_extents(trans);
        if (ret < 0)
                goto out;
 
@@ -2185,7 +2185,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
         * Since fs roots are all committed, we can get a quite accurate
         * new_roots. So let's do quota accounting.
         */
-       ret = btrfs_qgroup_account_extents(trans, fs_info);
+       ret = btrfs_qgroup_account_extents(trans);
        if (ret < 0) {
                mutex_unlock(&fs_info->tree_log_mutex);
                mutex_unlock(&fs_info->reloc_mutex);