From: Wang Shilong <wangsl-f...@cn.fujitsu.com> In kernel, qgroupid 0 is a special number when we run the quota group limit command.
So, we should not be able to create a quota group whose id is 0, otherwise the kernel can't deal with it. Fix it. Signed-off-by: Wang Shilong <wangsl-f...@cn.fujitsu.com> Signed-off-by: Miao Xie <mi...@cn.fujitsu.com> Signed-off-by: Gene Czarcinski <g...@czarc.net> --- cmds-qgroup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 70019d0..dfff1b9 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -86,6 +86,10 @@ static int qgroup_create(int create, int argc, char **argv) args.create = create; args.qgroupid = parse_qgroupid(argv[1]); + if (!args.qgroupid) { + fprintf(stderr, "ERROR: qgroup 0 is not supported\n"); + return 30; + } fd = open_file_or_dir(path); if (fd < 0) { fprintf(stderr, "ERROR: can't access '%s'\n", path); -- 1.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html