From: Lu Fengqi Date: Thu, 11 Oct 2018 05:42:56 +0000 (+0800) Subject: btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch X-Git-Tag: v5.4-rc1~2111^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b90e22ba4804d31160f6cd625efa599ba9d286af;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 27f5173..45868fd 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) if (!qgroup) { ret = -ENOENT; goto out; - } else { - /* check if there are no children of this qgroup */ - if (!list_empty(&qgroup->members)) { - ret = -EBUSY; - goto out; - } } + + /* Check if there are no children of this qgroup */ + if (!list_empty(&qgroup->members)) { + ret = -EBUSY; + goto out; + } + ret = del_qgroup_item(trans, qgroupid); if (ret && ret != -ENOENT) goto out;