lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <628a0278-6809-4d2e-94f3-14a882bfa34b@huawei.com>
Date: Tue, 3 Sep 2024 15:52:01 +0800
From: Baokun Li <libaokun1@...wei.com>
To: Li Zetao <lizetao1@...wei.com>, <tytso@....edu>,
	<adilger.kernel@...ger.ca>
CC: <linux-ext4@...r.kernel.org>, Baokun Li <libaokun1@...wei.com>
Subject: Re: [PATCH -next] ext4: Remove redundant null pointer check

Hi Zetao,

On 2024/8/20 9:32, Li Zetao wrote:
> Since the ext4_find_extent() does not return a null pointer, the check for
> the null pointer here is redundant. Drop null pointer check for clean
> code.
>
> No functional change intended.
>
> Signed-off-by: Li Zetao <lizetao1@...wei.com>
> ---
>   fs/ext4/extents.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index e067f2dd0335..12f0771d57d2 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -6112,7 +6112,7 @@ int ext4_ext_clear_bb(struct inode *inode)
>   			break;
>   		if (ret > 0) {
>   			path = ext4_find_extent(inode, map.m_lblk, NULL, 0);
> -			if (!IS_ERR_OR_NULL(path)) {
> +			if (!IS_ERR(path)) {
>   				for (j = 0; j < path->p_depth; j++) {
>   
>   					ext4_mb_mark_bb(inode->i_sb,

Thanks for the cleanup patch.

But the change is already included in the patch:

  https://lore.kernel.org/all/20240710040654.1714672-21-libaokun@huaweicloud.com/


Thanks,
Baokun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ