aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>2018-10-11 01:42:56 -0400
committerDavid Sterba <dsterba@suse.com>2018-10-15 11:23:40 -0400
commitb90e22ba4804d31160f6cd625efa599ba9d286af (patch)
treebf3c6216ec4d56263203b8b819f40a61cc0e3745
parent06bbf67244fc63c66340bd31f4b2b60d797e886e (diff)
btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch
There is no reason to put this check in (!qgroup)'s else branch because if qgroup is null, it will goto out directly. So move it out to reduce indentation level. No functional change. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/qgroup.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 27f517315388..45868fd76209 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1416,13 +1416,14 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid)
1416 if (!qgroup) { 1416 if (!qgroup) {
1417 ret = -ENOENT; 1417 ret = -ENOENT;
1418 goto out; 1418 goto out;
1419 } else {
1420 /* check if there are no children of this qgroup */
1421 if (!list_empty(&qgroup->members)) {
1422 ret = -EBUSY;
1423 goto out;
1424 }
1425 } 1419 }
1420
1421 /* Check if there are no children of this qgroup */
1422 if (!list_empty(&qgroup->members)) {
1423 ret = -EBUSY;
1424 goto out;
1425 }
1426
1426 ret = del_qgroup_item(trans, qgroupid); 1427 ret = del_qgroup_item(trans, qgroupid);
1427 if (ret && ret != -ENOENT) 1428 if (ret && ret != -ENOENT)
1428 goto out; 1429 goto out;