summaryrefslogtreecommitdiff
path: root/fs/notify
diff options
context:
space:
mode:
authorBang Li <libang.linuxer@gmail.com>2022-03-11 23:12:40 +0800
committerJan Kara <jack@suse.cz>2022-03-14 09:05:25 +0100
commitf92ca72b0263d601807bbd23ed25cbe6f4da89f4 (patch)
treee912773ed496eabc96b1d33dc86f6c34eb54a186 /fs/notify
parent04e317ba72d07901b03399b3d1525e83424df5b3 (diff)
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>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/fsnotify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 494f653efbc6..70a8516b78bc 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)