diff options
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r-- | include/linux/fsnotify_backend.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 4d6f47b51189..e776fb5ed01a 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -276,10 +276,10 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
276 | { | 276 | { |
277 | struct dentry *parent; | 277 | struct dentry *parent; |
278 | 278 | ||
279 | assert_spin_locked(&dcache_lock); | ||
280 | assert_spin_locked(&dentry->d_lock); | 279 | assert_spin_locked(&dentry->d_lock); |
281 | 280 | ||
282 | parent = dentry->d_parent; | 281 | parent = dentry->d_parent; |
282 | /* XXX: after dcache_lock removal, there is a race with parent->d_inode and fsnotify_inode_watches_children. must fix */ | ||
283 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) | 283 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) |
284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; | 284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; |
285 | else | 285 | else |
@@ -288,15 +288,12 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
288 | 288 | ||
289 | /* | 289 | /* |
290 | * fsnotify_d_instantiate - instantiate a dentry for inode | 290 | * fsnotify_d_instantiate - instantiate a dentry for inode |
291 | * Called with dcache_lock held. | ||
292 | */ | 291 | */ |
293 | static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) | 292 | static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) |
294 | { | 293 | { |
295 | if (!inode) | 294 | if (!inode) |
296 | return; | 295 | return; |
297 | 296 | ||
298 | assert_spin_locked(&dcache_lock); | ||
299 | |||
300 | spin_lock(&dentry->d_lock); | 297 | spin_lock(&dentry->d_lock); |
301 | __fsnotify_update_dcache_flags(dentry); | 298 | __fsnotify_update_dcache_flags(dentry); |
302 | spin_unlock(&dentry->d_lock); | 299 | spin_unlock(&dentry->d_lock); |
@@ -347,7 +344,7 @@ extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry); | |||
347 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); | 344 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); |
348 | extern void fsnotify_get_mark(struct fsnotify_mark_entry *entry); | 345 | extern void fsnotify_get_mark(struct fsnotify_mark_entry *entry); |
349 | extern void fsnotify_put_mark(struct fsnotify_mark_entry *entry); | 346 | extern void fsnotify_put_mark(struct fsnotify_mark_entry *entry); |
350 | extern void fsnotify_unmount_inodes(struct list_head *list); | 347 | extern void fsnotify_unmount_inodes(struct super_block *sb); |
351 | 348 | ||
352 | /* put here because inotify does some weird stuff when destroying watches */ | 349 | /* put here because inotify does some weird stuff when destroying watches */ |
353 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, | 350 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, |
@@ -377,7 +374,7 @@ static inline u32 fsnotify_get_cookie(void) | |||
377 | return 0; | 374 | return 0; |
378 | } | 375 | } |
379 | 376 | ||
380 | static inline void fsnotify_unmount_inodes(struct list_head *list) | 377 | static inline void fsnotify_unmount_inodes(struct super_block *sb) |
381 | {} | 378 | {} |
382 | 379 | ||
383 | #endif /* CONFIG_FSNOTIFY */ | 380 | #endif /* CONFIG_FSNOTIFY */ |