Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsnotify: remove redundant parameter judgment

iput() has already judged the incoming parameter, so there is no need to
repeat the judgment here.

Link: https://lore.kernel.org/r/20220311151240.62045-1-libang.linuxer@gmail.com
Signed-off-by: Bang Li <libang.linuxer@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Bang Li and committed by
Jan Kara
f92ca72b 04e317ba

+2 -4
+2 -4
fs/notify/fsnotify.c
··· 70 70 spin_unlock(&inode->i_lock); 71 71 spin_unlock(&sb->s_inode_list_lock); 72 72 73 - if (iput_inode) 74 - iput(iput_inode); 73 + iput(iput_inode); 75 74 76 75 /* for each watch, send FS_UNMOUNT and then remove it */ 77 76 fsnotify_inode(inode, FS_UNMOUNT); ··· 84 85 } 85 86 spin_unlock(&sb->s_inode_list_lock); 86 87 87 - if (iput_inode) 88 - iput(iput_inode); 88 + iput(iput_inode); 89 89 } 90 90 91 91 void fsnotify_sb_delete(struct super_block *sb)