path: root/cmds-qgroup.c
diff options
authorLu Fengqi <>2017-11-13 13:33:15 +0800
committerDavid Sterba <>2018-01-08 19:22:43 +0100
commitf0445b8a344b496e6c070c733e445bf79a8fad58 (patch)
tree22edfdf8a3a0c3b84d093709ead970030cc9f08e /cmds-qgroup.c
parent82ee5aec231058ef88e18b26e9dbd7117accd491 (diff)
btrfs-progs: qgroup: move btrfs_show_qgroups's error handler to __qgroup_search
We have to process the return value of BTRFS_IOC_TREE_SEARCH ioctl in advance, so that we can distinguish between the two case where quota is not enabled (ioctl return -ENOENT) and either parent qgroup or child qgroup does not exist (update_qgroup_relation return -ENOENT). Besides this, any error in this routine has been reported, so we don't need to report again in cmd_qgroup_show. Signed-off-by: Lu Fengqi <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-qgroup.c')
1 files changed, 0 insertions, 4 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 38382ea9..d07bb0c0 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -399,10 +399,6 @@ static int cmd_qgroup_show(int argc, char **argv)
ret = btrfs_show_qgroups(fd, filter_set, comparer_set);
- if (ret == -ENOENT)
- error("can't list qgroups: quotas not enabled");
- else if (ret < 0)
- error("can't list qgroups: %s", strerror(-ret));
close_file_or_dir(fd, dirstream);