From: Bang Li Date: Fri, 11 Mar 2022 15:12:40 +0000 (+0800) Subject: fsnotify: remove redundant parameter judgment X-Git-Tag: v5.18-rc1~108^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f92ca72b0263d601807bbd23ed25cbe6f4da89f4;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jan Kara --- diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 494f653efbc6e..70a8516b78bc5 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)