aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJohn McCutchan <ttb@tentacle.dhs.org>2005-08-04 21:12:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-05 00:37:39 -0400
commit0c3dba1534569734ba353afdf3f11def497ff2ac (patch)
treeec52740643c710072aab5122e96851c63ed049a0 /include/linux
parentf10eff26831159f52353e8f15c37cdb2935d5fbf (diff)
[PATCH] Clean up inotify delete race fix
This avoids the whole #ifdef mess by just getting a copy of dentry->d_inode before d_delete is called - that makes the codepaths the same for the INOTIFY/DNOTIFY cases as for the regular no-notify case. I've been running this under a Gnome session for the last 10 minutes. Inotify is being used extensively. Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fsnotify.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index e96a4306ab3b..1cb4935348d8 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -46,10 +46,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
46/* 46/*
47 * fsnotify_unlink - file was unlinked 47 * fsnotify_unlink - file was unlinked
48 */ 48 */
49static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) 49static inline void fsnotify_unlink(struct dentry *dentry, struct inode *inode, struct inode *dir)
50{ 50{
51 struct inode *inode = dentry->d_inode;
52
53 inode_dir_notify(dir, DN_DELETE); 51 inode_dir_notify(dir, DN_DELETE);
54 inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); 52 inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name);
55 inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); 53 inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL);