diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-11-15 11:35:41 +0000 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2013-01-14 13:52:31 -0500 |
commit | d86e56cf7d3669dd292012ac82b986bd1573b6cc (patch) | |
tree | 60995d977a3143b8ca0d771db80606163f6a72f7 /fs | |
parent | cc975eb4605c5765a5d5e7a51d24ba5a1cda269e (diff) |
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 <miaox@cn.fujitsu.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 7624212ae92..dd8e3448fe8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3698,6 +3698,11 @@ static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg) goto drop_write; } + if (!sa->qgroupid) { + ret = -EINVAL; + goto out; + } + trans = btrfs_join_transaction(root); if (IS_ERR(trans)) { ret = PTR_ERR(trans); |