btrfs: qgroup: Drop fs_info parameter from btrfs_limit_qgroup
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Wed, 18 Jul 2018 06:45:35 +0000 (14:45 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:51 +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

index cb2b74db24ea5a10ed0dcfb0e5883a92b50c33d9..01aab038120ed5f9adc5792520c0202089d477fc 100644 (file)
@@ -5245,7 +5245,6 @@ drop_write:
 static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg)
 {
        struct inode *inode = file_inode(file);
-       struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_ioctl_qgroup_limit_args *sa;
        struct btrfs_trans_handle *trans;
@@ -5278,7 +5277,7 @@ static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg)
                qgroupid = root->root_key.objectid;
        }
 
-       ret = btrfs_limit_qgroup(trans, fs_info, qgroupid, &sa->lim);
+       ret = btrfs_limit_qgroup(trans, qgroupid, &sa->lim);
 
        err = btrfs_end_transaction(trans);
        if (err && !ret)
index d3d205d0e1767b26da335dd81574eec3b2c81882..8953d02648878ac868f8cdb682ce777b8df5efe0 100644 (file)
@@ -1445,10 +1445,10 @@ out:
        return ret;
 }
 
-int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
-                      struct btrfs_fs_info *fs_info, u64 qgroupid,
+int btrfs_limit_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid,
                       struct btrfs_qgroup_limit *limit)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *quota_root;
        struct btrfs_qgroup *qgroup;
        int ret = 0;
index 41516dddf12302e973603eda763855673849d69b..385367989ed617780e01e1ed1dc2431aba2a4c00 100644 (file)
@@ -153,8 +153,7 @@ int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
                              u64 dst);
 int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid);
 int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid);
-int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
-                      struct btrfs_fs_info *fs_info, u64 qgroupid,
+int btrfs_limit_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid,
                       struct btrfs_qgroup_limit *limit);
 int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info);
 void btrfs_free_qgroup_config(struct btrfs_fs_info *fs_info);