Skip to content

Commit

Permalink
fsnotify: remove redundant parameter judgment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
libang-linuxer authored and jankara committed Mar 14, 2022
1 parent 04e317b commit f92ca72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/notify/fsnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit f92ca72

Please sign in to comment.