Wang Shilong
2013-Feb-25 14:30 UTC
[PATCH] Btrfs: fix overhead check for qgroupid in the kernel
From: Wang Shilong <wangsl-fnst@cn.fujitsu.com> As we implement the strict hierarchy quota in the userspace, it is sufficient to check this ruler in the userspace.remove the special check for qgroup 0. Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> --- fs/btrfs/ioctl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 059546a..8a31a04 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3764,11 +3764,6 @@ 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); -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Blair Zajac
2013-Feb-25 17:38 UTC
Re: [PATCH] Btrfs: fix overhead check for qgroupid in the kernel
On 02/25/2013 06:30 AM, Wang Shilong wrote:> From: Wang Shilong <wangsl-fnst@cn.fujitsu.com> > > As we implement the strict hierarchy quota in the userspace, > it is sufficient to check this ruler in the userspace.remove > the special check for qgroup 0.I haven''t done any kernel coding so I''m curious, but is this a safe change? When I code, I always have the authoritative code do a check, e.g. in web programing, the browser can do data validation but you always have the web server check incoming data also, so it doesn''t hurt to have it in the kernel itself. The other thing is that it is possible for people and distributions to upgrade the kernel without upgrading the btrfs tools, so there could be a window when there is no check on somebody''s system. Regards, Blair -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html