Re: [PATCH] ext4: remove unneeded check of nr_to_submit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 16, 2023 at 04:48:31PM -0400, Tom Rix wrote:
> cppcheck reports
> fs/ext4/page-io.c:516:51: style:
>   Condition 'nr_to_submit' is always true [knownConditionTrueFalse]
>  if (fscrypt_inode_uses_fs_layer_crypto(inode) && nr_to_submit) {
>                                                   ^
> This earlier check to bail, makes this check unncessary
> 	/* Nothing to submit? Just unlock the page... */
> 	if (!nr_to_submit)
> 		return 0;
> 
> Signed-off-by: Tom Rix <trix@xxxxxxxxxx>

Maybe add:

Fixes: dff4ac75eeee ("ext4: move keep_towrite handling to ext4_bio_write_page()")

Either way, looks good to me.

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

- Eric



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux