diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 17:23:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 17:23:04 -0400 |
commit | 2069601b3f0ea38170d4b509b89f3ca0a373bdc1 (patch) | |
tree | 647002d4c3814bd3d95d16ef7edef1757de8554f /fs/notify/fsnotify.c | |
parent | ad41a1e0cab07c5125456e8d38e5b1ab148d04aa (diff) |
Revert "fsnotify: store struct file not struct path"
This reverts commit 3bcf3860a4ff9bbc522820b4b765e65e4deceb3e (and the
accompanying commit c1e5c954020e "vfs/fsnotify: fsnotify_close can delay
the final work in fput" that was a horribly ugly hack to make it work at
all).
The 'struct file' approach not only causes that disgusting hack, it
somehow breaks pulseaudio, probably due to some other subtlety with
f_count handling.
Fix up various conflicts due to later fsnotify work.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/notify/fsnotify.c')
-rw-r--r-- | fs/notify/fsnotify.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 4d2a82c1ceb1..3970392b2722 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c | |||
@@ -84,7 +84,7 @@ void __fsnotify_update_child_dentry_flags(struct inode *inode) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* Notify this dentry's parent about a child's events. */ | 86 | /* Notify this dentry's parent about a child's events. */ |
87 | void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask) | 87 | void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask) |
88 | { | 88 | { |
89 | struct dentry *parent; | 89 | struct dentry *parent; |
90 | struct inode *p_inode; | 90 | struct inode *p_inode; |
@@ -92,7 +92,7 @@ void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask) | |||
92 | bool should_update_children = false; | 92 | bool should_update_children = false; |
93 | 93 | ||
94 | if (!dentry) | 94 | if (!dentry) |
95 | dentry = file->f_path.dentry; | 95 | dentry = path->dentry; |
96 | 96 | ||
97 | if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED)) | 97 | if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED)) |
98 | return; | 98 | return; |
@@ -124,8 +124,8 @@ void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask) | |||
124 | * specifies these are events which came from a child. */ | 124 | * specifies these are events which came from a child. */ |
125 | mask |= FS_EVENT_ON_CHILD; | 125 | mask |= FS_EVENT_ON_CHILD; |
126 | 126 | ||
127 | if (file) | 127 | if (path) |
128 | fsnotify(p_inode, mask, file, FSNOTIFY_EVENT_FILE, | 128 | fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH, |
129 | dentry->d_name.name, 0); | 129 | dentry->d_name.name, 0); |
130 | else | 130 | else |
131 | fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE, | 131 | fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE, |
@@ -217,8 +217,8 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, | |||
217 | /* global tests shouldn't care about events on child only the specific event */ | 217 | /* global tests shouldn't care about events on child only the specific event */ |
218 | __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD); | 218 | __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD); |
219 | 219 | ||
220 | if (data_is == FSNOTIFY_EVENT_FILE) | 220 | if (data_is == FSNOTIFY_EVENT_PATH) |
221 | mnt = ((struct file *)data)->f_path.mnt; | 221 | mnt = ((struct path *)data)->mnt; |
222 | else | 222 | else |
223 | mnt = NULL; | 223 | mnt = NULL; |
224 | 224 | ||