fsnotify: remove redundant parameter judgment
[ Upstream commit f92ca72b0263d601807bbd23ed25cbe6f4da89f4 ] 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> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
552c24a32c
commit
a5fa9c824d
@@ -70,8 +70,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
|
|||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
spin_unlock(&sb->s_inode_list_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 */
|
/* for each watch, send FS_UNMOUNT and then remove it */
|
||||||
fsnotify_inode(inode, FS_UNMOUNT);
|
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);
|
spin_unlock(&sb->s_inode_list_lock);
|
||||||
|
|
||||||
if (iput_inode)
|
iput(iput_inode);
|
||||||
iput(iput_inode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void fsnotify_sb_delete(struct super_block *sb)
|
void fsnotify_sb_delete(struct super_block *sb)
|
||||||
|
Reference in New Issue
Block a user