btrfs-progs: qgroup: move btrfs_show_qgroups's error handler to __qgroup_search
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Mon, 13 Nov 2017 05:33:15 +0000 (13:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jan 2018 18:22:43 +0000 (19:22 +0100)
commitf0445b8a344b496e6c070c733e445bf79a8fad58
tree22edfdf8a3a0c3b84d093709ead970030cc9f08e
parent82ee5aec231058ef88e18b26e9dbd7117accd491
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 <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-qgroup.c
qgroup.c