[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yk7819rrn4MZlGog@mit.edu>
Date: Thu, 7 Apr 2022 11:01:43 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: cgel.zte@...il.com
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, Lv Ruyi <lv.ruyi@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] ext4: remove redundant judgment
On Wed, Apr 06, 2022 at 09:05:01AM +0000, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>
>
> iput() has already handled null and non-null parameter. so there is no
> need to use if().
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....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
Powered by blists - more mailing lists