btrfs: qgroup: Drop fs_info parameter from btrfs_create_qgroup
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>
This commit is contained in:
parent
39616c2735
commit
49a05ecde3
|
@ -5227,7 +5227,7 @@ static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa->create) {
|
if (sa->create) {
|
||||||
ret = btrfs_create_qgroup(trans, fs_info, sa->qgroupid);
|
ret = btrfs_create_qgroup(trans, sa->qgroupid);
|
||||||
} else {
|
} else {
|
||||||
ret = btrfs_remove_qgroup(trans, fs_info, sa->qgroupid);
|
ret = btrfs_remove_qgroup(trans, fs_info, sa->qgroupid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1364,9 +1364,9 @@ int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
|
int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid)
|
||||||
struct btrfs_fs_info *fs_info, u64 qgroupid)
|
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = trans->fs_info;
|
||||||
struct btrfs_root *quota_root;
|
struct btrfs_root *quota_root;
|
||||||
struct btrfs_qgroup *qgroup;
|
struct btrfs_qgroup *qgroup;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -151,8 +151,7 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
|
||||||
u64 dst);
|
u64 dst);
|
||||||
int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
|
int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
|
||||||
u64 dst);
|
u64 dst);
|
||||||
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
|
int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid);
|
||||||
struct btrfs_fs_info *fs_info, u64 qgroupid);
|
|
||||||
int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
|
int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_fs_info *fs_info, u64 qgroupid);
|
struct btrfs_fs_info *fs_info, u64 qgroupid);
|
||||||
int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
|
int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
|
||||||
|
|
|
@ -216,7 +216,7 @@ static int test_no_shared_qgroup(struct btrfs_root *root,
|
||||||
btrfs_init_dummy_trans(&trans, fs_info);
|
btrfs_init_dummy_trans(&trans, fs_info);
|
||||||
|
|
||||||
test_msg("qgroup basic add");
|
test_msg("qgroup basic add");
|
||||||
ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FS_TREE_OBJECTID);
|
ret = btrfs_create_qgroup(&trans, BTRFS_FS_TREE_OBJECTID);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
test_err("couldn't create a qgroup %d", ret);
|
test_err("couldn't create a qgroup %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -322,7 +322,7 @@ static int test_multiple_refs(struct btrfs_root *root,
|
||||||
* We have BTRFS_FS_TREE_OBJECTID created already from the
|
* We have BTRFS_FS_TREE_OBJECTID created already from the
|
||||||
* previous test.
|
* previous test.
|
||||||
*/
|
*/
|
||||||
ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FIRST_FREE_OBJECTID);
|
ret = btrfs_create_qgroup(&trans, BTRFS_FIRST_FREE_OBJECTID);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
test_err("couldn't create a qgroup %d", ret);
|
test_err("couldn't create a qgroup %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue