Btrfs: disable qgroup id 0
PATCH 1/1 Btrfs: disable qgroup id 0
Qgroup id 0 is a special number, we should set the id of a qgroup to 0. Fix it.
Signed-off-by Miao Xie <[email protected]>
--- fs/btrfs/ioctl.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/btrfs/ioctl.c +5 -0
@@ -3574,6 +3574,11 @@ static long btrfs_ioctl_qgroup_create(struct btrfs_root *root, void __user *arg)if (IS_ERR (sa))return PTR_ERR (sa); +if (!sa->qgroupid) { + ret = -EINVAL ; + goto out; + } + trans =btrfs_join_transaction (root);if (IS_ERR (trans)) { ret =PTR_ERR (trans);
Signature · 1 line
1.7.11.7