All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: disable qgroup id 0
@ 2012-11-15 11:35 Miao Xie
  0 siblings, 0 replies; only message in thread
From: Miao Xie @ 2012-11-15 11:35 UTC (permalink / raw)
  To: Linux Btrfs; +Cc: Arne Jansen

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>
---
 fs/btrfs/ioctl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8e5b7fa..922a33a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-15 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 11:35 [PATCH] Btrfs: disable qgroup id 0 Miao Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.