From: Nikolay Borisov <nborisov@suse.com>
To: Lu Fengqi <lufq.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch
Date: Thu, 11 Oct 2018 09:42:45 +0300 [thread overview]
Message-ID: <3597c689-6b14-db1c-cfd2-e66f61328e4a@suse.com> (raw)
In-Reply-To: <20181011054256.5643-1-lufq.fnst@cn.fujitsu.com>
On 11.10.2018 08:42, Lu Fengqi wrote:
> 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
> indent.
>
> No Functional Change.
>
> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/qgroup.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
> index 27f517315388..af65ab1640b0 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;
>
next prev parent reply other threads:[~2018-10-11 6:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 5:42 [PATCH] btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch Lu Fengqi
2018-10-11 6:42 ` Nikolay Borisov [this message]
2018-10-11 11:38 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3597c689-6b14-db1c-cfd2-e66f61328e4a@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lufq.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).