Skip to content

Commit f92ca72

Browse files
libang-linuxerjankara
authored andcommitted
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/[email protected] Signed-off-by: Bang Li <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent 04e317b commit f92ca72

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/notify/fsnotify.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
7070
spin_unlock(&inode->i_lock);
7171
spin_unlock(&sb->s_inode_list_lock);
7272

73-
if (iput_inode)
74-
iput(iput_inode);
73+
iput(iput_inode);
7574

7675
/* for each watch, send FS_UNMOUNT and then remove it */
7776
fsnotify_inode(inode, FS_UNMOUNT);
@@ -85,8 +84,7 @@ static void fsnotify_unmount_inodes(struct super_block *sb)
8584
}
8685
spin_unlock(&sb->s_inode_list_lock);
8786

88-
if (iput_inode)
89-
iput(iput_inode);
87+
iput(iput_inode);
9088
}
9189

9290
void fsnotify_sb_delete(struct super_block *sb)

0 commit comments

Comments
 (0)