btrfs: qgroup: Drop fs_info parameter from btrfs_run_qgroups
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Wed, 18 Jul 2018 06:45:40 +0000 (14:45 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:52 +0000 (13:12 +0200)
It can be fetched from the transaction handle.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h
fs/btrfs/transaction.c

index 01aab038120ed5f9adc5792520c0202089d477fc..d0096383ac3dd1b5c3e0db797c84ee638403bb9c 100644 (file)
@@ -5177,7 +5177,7 @@ static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg)
        }
 
        /* update qgroup status and info */
-       err = btrfs_run_qgroups(trans, fs_info);
+       err = btrfs_run_qgroups(trans);
        if (err < 0)
                btrfs_handle_fs_error(fs_info, err,
                                      "failed to update qgroup status and info");
index 5ac57fc3fa4b5e9fab36bb66146f1d675e1d7c14..819cdaea51ab3bae3fd20d53eafbd261ee2d88f1 100644 (file)
@@ -2193,9 +2193,9 @@ cleanup:
 /*
  * called from commit_transaction. Writes all changed qgroups to disk.
  */
-int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
-                     struct btrfs_fs_info *fs_info)
+int btrfs_run_qgroups(struct btrfs_trans_handle *trans)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *quota_root = fs_info->quota_root;
        int ret = 0;
 
index 61b723b1e4d8510dee4c8968b574f9d6eca62c7b..2c8960f9028cd4290377d1e2bbd846b1ecaa77fa 100644 (file)
@@ -240,8 +240,7 @@ int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr,
                                u64 num_bytes, struct ulist *old_roots,
                                struct ulist *new_roots);
 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_run_qgroups(struct btrfs_trans_handle *trans);
 int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
                         struct btrfs_fs_info *fs_info, u64 srcid, u64 objectid,
                         struct btrfs_qgroup_inherit *inherit);
index ebe50dfb894777cf509b4cb2a5f4e901bdb9c24a..0cbd55c498a198f6eddb8feafcf2f42b1bfa98f7 100644 (file)
@@ -1152,7 +1152,7 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
        ret = btrfs_run_dev_replace(trans, fs_info);
        if (ret)
                return ret;
-       ret = btrfs_run_qgroups(trans, fs_info);
+       ret = btrfs_run_qgroups(trans);
        if (ret)
                return ret;