From: "Theodore Ts'o" <tytso@mit.edu>
To: cgel.zte@gmail.com
Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, Lv Ruyi <lv.ruyi@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] ext4: remove redundant judgment
Date: Thu, 7 Apr 2022 11:01:43 -0400 [thread overview]
Message-ID: <Yk7819rrn4MZlGog@mit.edu> (raw)
In-Reply-To: <20220406090501.2488853-1-lv.ruyi@zte.com.cn>
On Wed, Apr 06, 2022 at 09:05:01AM +0000, cgel.zte@gmail.com wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> iput() has already handled null and non-null parameter. so there is no
> need to use if().
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
I'd use the word "conditional" instead of "judgment", so I'd suggest rewording it as:
>ext4: remove unnecessary conditional
>
>
>iput() already tests to see if it is called with a NULL argument, so
>there is no need to check if the inode is NULL before calling iput().
I've noticed that you've submitted this for other subsystems, so I'd
thought I'd mention it before just applying the patch and quietly
adjusting the commit description for clarity.
- Ted
prev parent reply other threads:[~2022-04-07 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 9:05 [PATCH] ext4: remove redundant judgment cgel.zte
2022-04-07 15:01 ` Theodore Ts'o [this message]
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=Yk7819rrn4MZlGog@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=cgel.zte@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.ruyi@zte.com.cn \
--cc=zealci@zte.com.cn \
/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).