fsnotify: get rid of fsnotify_nameremove()

For all callers of fsnotify_{unlink,rmdir}(), we made sure that d_parent
and d_name are stable.  Therefore, fsnotify_{unlink,rmdir}() do not need
the safety measures in fsnotify_nameremove() to stabilize parent and name.
We can now simplify those hooks and get rid of fsnotify_nameremove().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Amir Goldstein
2019-05-26 17:34:11 +03:00
committed by Jan Kara
parent 49246466a9
commit 7377f5bec1
3 changed files with 2 additions and 49 deletions

View File

@@ -198,8 +198,7 @@ static inline void fsnotify_unlink(struct inode *dir, struct dentry *dentry)
/* Expected to be called before d_delete() */
WARN_ON_ONCE(d_is_negative(dentry));
/* TODO: call fsnotify_dirent() */
fsnotify_nameremove(dentry, 0);
fsnotify_dirent(dir, dentry, FS_DELETE);
}
/*
@@ -222,8 +221,7 @@ static inline void fsnotify_rmdir(struct inode *dir, struct dentry *dentry)
/* Expected to be called before d_delete() */
WARN_ON_ONCE(d_is_negative(dentry));
/* TODO: call fsnotify_dirent() */
fsnotify_nameremove(dentry, 1);
fsnotify_dirent(dir, dentry, FS_DELETE | FS_ISDIR);
}
/*