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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220314080540.ovk66yvuyzfbi4zt@quack3.lan>
Date:   Mon, 14 Mar 2022 09:05:40 +0100
From:   Jan Kara <jack@...e.cz>
To:     Bang Li <libang.linuxer@...il.com>
Cc:     jack@...e.cz, amir73il@...il.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fsnotify: remove redundant parameter judgment

On Fri 11-03-22 23:12:40, Bang Li wrote:
> iput() has already judged the incoming parameter, so there is no need to
> repeat the judgment here.
> 
> Signed-off-by: Bang Li <libang.linuxer@...il.com>

Thanks. I've applied the patch to my tree.

								Honza

> ---
>  fs/notify/fsnotify.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
> index 494f653efbc6..70a8516b78bc 100644
> --- a/fs/notify/fsnotify.c
> +++ b/fs/notify/fsnotify.c
> @@ -70,8 +70,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
>  		spin_unlock(&inode->i_lock);
>  		spin_unlock(&sb->s_inode_list_lock);
>  
> -		if (iput_inode)
> -			iput(iput_inode);
> +		iput(iput_inode);
>  
>  		/* for each watch, send FS_UNMOUNT and then remove it */
>  		fsnotify_inode(inode, FS_UNMOUNT);
> @@ -85,8 +84,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
>  	}
>  	spin_unlock(&sb->s_inode_list_lock);
>  
> -	if (iput_inode)
> -		iput(iput_inode);
> +	iput(iput_inode);
>  }
>  
>  void fsnotify_sb_delete(struct super_block *sb)
> -- 
> 2.25.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ