diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 09943e396c771193e78d7a8a0343c207ad1f4bc2..2fdc34a67139f46ba330c9d299266fa1686a471f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -5227,7 +5227,7 @@ static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) } if (sa->create) { - ret = btrfs_create_qgroup(trans, fs_info, sa->qgroupid); + ret = btrfs_create_qgroup(trans, sa->qgroupid); } else { ret = btrfs_remove_qgroup(trans, fs_info, sa->qgroupid); } diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 8c6f594a7ee834a5af22aa66d66860c3e157db1e..9c97be3fbf354252b907b16cd9d7211a5adef53f 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1364,9 +1364,9 @@ int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src, return ret; } -int btrfs_create_qgroup(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info, u64 qgroupid) +int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid) { + struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_root *quota_root; struct btrfs_qgroup *qgroup; int ret = 0; diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h index 539d4c449f26ea3d8d4bbecb8063ca89d572fa7e..03adfedd9d017e67be2b3805806718be100159bb 100644 --- a/fs/btrfs/qgroup.h +++ b/fs/btrfs/qgroup.h @@ -151,8 +151,7 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans, u64 src, u64 dst); int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src, u64 dst); -int btrfs_create_qgroup(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info, u64 qgroupid); +int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid); int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, u64 qgroupid); int btrfs_limit_qgroup(struct btrfs_trans_handle *trans, diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c index ace94db09d29dc37bc8273e2ec012a2473bec6a1..b5e332d45d374cac68216df9117d8ee1a0af7e17 100644 --- a/fs/btrfs/tests/qgroup-tests.c +++ b/fs/btrfs/tests/qgroup-tests.c @@ -216,7 +216,7 @@ static int test_no_shared_qgroup(struct btrfs_root *root, btrfs_init_dummy_trans(&trans, fs_info); 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) { test_err("couldn't create a qgroup %d", 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 * previous test. */ - ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FIRST_FREE_OBJECTID); + ret = btrfs_create_qgroup(&trans, BTRFS_FIRST_FREE_OBJECTID); if (ret) { test_err("couldn't create a qgroup %d", ret); return ret;