projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04e317b
)
fsnotify: remove redundant parameter judgment
author
Bang Li
<libang.linuxer@gmail.com>
Fri, 11 Mar 2022 15:12:40 +0000
(23:12 +0800)
committer
Jan Kara
<jack@suse.cz>
Mon, 14 Mar 2022 08:05:25 +0000
(09:05 +0100)
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>
fs/notify/fsnotify.c
patch
|
blob
|
history
diff --git
a/fs/notify/fsnotify.c
b/fs/notify/fsnotify.c
index 494f653efbc6e6675f1fe2f0b89e8ada206ec224..70a8516b78bc50810d9decc232d5395794392f73 100644
(file)
--- 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)