aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r--include/linux/fsnotify.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index f958e93feb97..845e57abfb86 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -153,8 +153,9 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
153/* 153/*
154 * fsnotify_access - file was read 154 * fsnotify_access - file was read
155 */ 155 */
156static inline void fsnotify_access(struct dentry *dentry) 156static inline void fsnotify_access(struct file *file)
157{ 157{
158 struct dentry *dentry = file->f_path.dentry;
158 struct inode *inode = dentry->d_inode; 159 struct inode *inode = dentry->d_inode;
159 __u32 mask = FS_ACCESS; 160 __u32 mask = FS_ACCESS;
160 161
@@ -162,14 +163,15 @@ static inline void fsnotify_access(struct dentry *dentry)
162 mask |= FS_IN_ISDIR; 163 mask |= FS_IN_ISDIR;
163 164
164 fsnotify_parent(dentry, mask); 165 fsnotify_parent(dentry, mask);
165 fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); 166 fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
166} 167}
167 168
168/* 169/*
169 * fsnotify_modify - file was modified 170 * fsnotify_modify - file was modified
170 */ 171 */
171static inline void fsnotify_modify(struct dentry *dentry) 172static inline void fsnotify_modify(struct file *file)
172{ 173{
174 struct dentry *dentry = file->f_path.dentry;
173 struct inode *inode = dentry->d_inode; 175 struct inode *inode = dentry->d_inode;
174 __u32 mask = FS_MODIFY; 176 __u32 mask = FS_MODIFY;
175 177
@@ -177,14 +179,15 @@ static inline void fsnotify_modify(struct dentry *dentry)
177 mask |= FS_IN_ISDIR; 179 mask |= FS_IN_ISDIR;
178 180
179 fsnotify_parent(dentry, mask); 181 fsnotify_parent(dentry, mask);
180 fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); 182 fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
181} 183}
182 184
183/* 185/*
184 * fsnotify_open - file was opened 186 * fsnotify_open - file was opened
185 */ 187 */
186static inline void fsnotify_open(struct dentry *dentry) 188static inline void fsnotify_open(struct file *file)
187{ 189{
190 struct dentry *dentry = file->f_path.dentry;
188 struct inode *inode = dentry->d_inode; 191 struct inode *inode = dentry->d_inode;
189 __u32 mask = FS_OPEN; 192 __u32 mask = FS_OPEN;
190 193
@@ -192,7 +195,7 @@ static inline void fsnotify_open(struct dentry *dentry)
192 mask |= FS_IN_ISDIR; 195 mask |= FS_IN_ISDIR;
193 196
194 fsnotify_parent(dentry, mask); 197 fsnotify_parent(dentry, mask);
195 fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); 198 fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
196} 199}
197 200
198/* 201/*