diff options
author | Amir Goldstein <[email protected]> | 2020-07-16 11:42:24 +0300 |
---|---|---|
committer | Jan Kara <[email protected]> | 2020-07-27 23:24:00 +0200 |
commit | 79cb299c7e181fad683bf6191edb8224b2412512 (patch) | |
tree | 7ba35063e2b152ec86c72a1a11ba2c934118fdbf | |
parent | 9b93f33105f5f9bd3d016ff870eb6000c9d89eff (diff) |
fsnotify: remove check that source dentry is positive
Remove the unneeded check for positive source dentry in
fsnotify_move().
fsnotify_move() hook is mostly called from vfs_rename() under
lock_rename() and vfs_rename() starts with may_delete() test that
verifies positive source dentry. The only other caller of
fsnotify_move() - debugfs_rename() also verifies positive source.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
-rw-r--r-- | include/linux/fsnotify.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 6e63f7e10da0..f8acddcf54fb 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -150,9 +150,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, if (target) fsnotify_link_count(target); - - if (source) - fsnotify_inode(source, FS_MOVE_SELF); + fsnotify_inode(source, FS_MOVE_SELF); audit_inode_child(new_dir, moved, AUDIT_TYPE_CHILD_CREATE); } |