From 9fb6ed1e7857539e2e46b1d8aec2005229006a9b Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Thu, 4 Aug 2005 21:12:54 -0400 Subject: [PATCH] --- yaml --- r: 5661 b: refs/heads/master c: 0c3dba1534569734ba353afdf3f11def497ff2ac h: refs/heads/master i: 5659: cd11f1cf43f851afe761ceb87f7c6f7083606bc3 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 9 ++------- trunk/include/linux/fsnotify.h | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 462c2715bf89..1626f5773d02 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f10eff26831159f52353e8f15c37cdb2935d5fbf +refs/heads/master: 0c3dba1534569734ba353afdf3f11def497ff2ac diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 83559dce4286..32accb6a672f 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1874,14 +1874,9 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry) /* We don't d_delete() NFS sillyrenamed files--they still exist. */ if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) { -#if defined(CONFIG_INOTIFY) || defined(CONFIG_DNOTIFY) - dget(dentry); + struct inode *inode = dentry->d_inode; d_delete(dentry); - fsnotify_unlink(dentry, dir); - dput(dentry); -#else - d_delete(dentry); -#endif + fsnotify_unlink(dentry, inode, dir); } return error; diff --git a/trunk/include/linux/fsnotify.h b/trunk/include/linux/fsnotify.h index e96a4306ab3b..1cb4935348d8 100644 --- a/trunk/include/linux/fsnotify.h +++ b/trunk/include/linux/fsnotify.h @@ -46,10 +46,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, /* * fsnotify_unlink - file was unlinked */ -static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) +static inline void fsnotify_unlink(struct dentry *dentry, struct inode *inode, struct inode *dir) { - struct inode *inode = dentry->d_inode; - inode_dir_notify(dir, DN_DELETE); inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL);