* [PATCH] Btrfs: fix overhead check for qgroupid in the kernel
@ 2013-02-25 14:30 Wang Shilong
2013-02-25 17:38 ` Blair Zajac
0 siblings, 1 reply; 2+ messages in thread
From: Wang Shilong @ 2013-02-25 14:30 UTC (permalink / raw)
To: linux-btrfs; +Cc: wangshilong1991
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: fix overhead check for qgroupid in the kernel
2013-02-25 14:30 [PATCH] Btrfs: fix overhead check for qgroupid in the kernel Wang Shilong
@ 2013-02-25 17:38 ` Blair Zajac
0 siblings, 0 replies; 2+ messages in thread
From: Blair Zajac @ 2013-02-25 17:38 UTC (permalink / raw)
To: Wang Shilong; +Cc: linux-btrfs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-25 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 14:30 [PATCH] Btrfs: fix overhead check for qgroupid in the kernel Wang Shilong
2013-02-25 17:38 ` Blair Zajac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).