diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2009-12-17 21:24:24 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:53 -0400 |
commit | 72acc854427948efed7a83da27f7dc3239ac9afc (patch) | |
tree | 69a8f479a644701a52abe07d7bf2751cdf4cc159 /fs/notify/fsnotify.c | |
parent | 098cf2fc77ee190c92bf9d08d69a13305f2487ec (diff) |
fsnotify: kill FSNOTIFY_EVENT_FILE
Some fsnotify operations send a struct file. This is more information than
we technically need. We instead send a struct path in all cases instead of
sometimes a path and sometimes a file.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fsnotify.c')
-rw-r--r-- | fs/notify/fsnotify.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 78c440c343a8..60e84fd338dd 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c | |||
@@ -79,15 +79,15 @@ void __fsnotify_update_child_dentry_flags(struct inode *inode) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /* Notify this dentry's parent about a child's events. */ | 81 | /* Notify this dentry's parent about a child's events. */ |
82 | void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask) | 82 | void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask) |
83 | { | 83 | { |
84 | struct dentry *parent; | 84 | struct dentry *parent; |
85 | struct inode *p_inode; | 85 | struct inode *p_inode; |
86 | bool send = false; | 86 | bool send = false; |
87 | bool should_update_children = false; | 87 | bool should_update_children = false; |
88 | 88 | ||
89 | if (file) | 89 | if (!dentry) |
90 | dentry = file->f_path.dentry; | 90 | dentry = path->dentry; |
91 | 91 | ||
92 | if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED)) | 92 | if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED)) |
93 | return; | 93 | return; |
@@ -119,8 +119,8 @@ void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask) | |||
119 | * specifies these are events which came from a child. */ | 119 | * specifies these are events which came from a child. */ |
120 | mask |= FS_EVENT_ON_CHILD; | 120 | mask |= FS_EVENT_ON_CHILD; |
121 | 121 | ||
122 | if (file) | 122 | if (path) |
123 | fsnotify(p_inode, mask, file, FSNOTIFY_EVENT_FILE, | 123 | fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH, |
124 | dentry->d_name.name, 0); | 124 | dentry->d_name.name, 0); |
125 | else | 125 | else |
126 | fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE, | 126 | fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE, |
@@ -194,8 +194,6 @@ void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const | |||
194 | 194 | ||
195 | if (data_is == FSNOTIFY_EVENT_PATH) | 195 | if (data_is == FSNOTIFY_EVENT_PATH) |
196 | mnt = ((struct path *)data)->mnt; | 196 | mnt = ((struct path *)data)->mnt; |
197 | else if (data_is == FSNOTIFY_EVENT_FILE) | ||
198 | mnt = ((struct file *)data)->f_path.mnt; | ||
199 | 197 | ||
200 | /* if this inode's directed listeners don't care and nothing on the vfsmount | 198 | /* if this inode's directed listeners don't care and nothing on the vfsmount |
201 | * listeners list cares, nothing to do */ | 199 | * listeners list cares, nothing to do */ |