aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-01-14 08:12:37 -0500
committerPatrick McHardy <kaber@trash.net>2011-01-14 08:12:37 -0500
commit0134e89c7bcc9fde1da962c82a120691e185619f (patch)
tree3e03335cf001019a2687d161e956de4f73379984 /include/linux/fsnotify_backend.h
parentc7066f70d9610df0b9406cc635fc09e86136e714 (diff)
parent6faee60a4e82075853a437831768cc9e2e563e4e (diff)
Merge branch 'master' of git://1984.lsi.us.es/net-next-2.6
Conflicts: net/ipv4/route.c Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r--include/linux/fsnotify_backend.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 0a68f924f06f..69ad89b50489 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -166,7 +166,7 @@ struct fsnotify_group {
166 struct mutex access_mutex; 166 struct mutex access_mutex;
167 struct list_head access_list; 167 struct list_head access_list;
168 wait_queue_head_t access_waitq; 168 wait_queue_head_t access_waitq;
169 bool bypass_perm; /* protected by access_mutex */ 169 atomic_t bypass_perm;
170#endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ 170#endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */
171 int f_flags; 171 int f_flags;
172 unsigned int max_marks; 172 unsigned int max_marks;
@@ -329,9 +329,15 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
329{ 329{
330 struct dentry *parent; 330 struct dentry *parent;
331 331
332 assert_spin_locked(&dcache_lock);
333 assert_spin_locked(&dentry->d_lock); 332 assert_spin_locked(&dentry->d_lock);
334 333
334 /*
335 * Serialisation of setting PARENT_WATCHED on the dentries is provided
336 * by d_lock. If inotify_inode_watched changes after we have taken
337 * d_lock, the following __fsnotify_update_child_dentry_flags call will
338 * find our entry, so it will spin until we complete here, and update
339 * us with the new state.
340 */
335 parent = dentry->d_parent; 341 parent = dentry->d_parent;
336 if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) 342 if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
337 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; 343 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
@@ -341,15 +347,12 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
341 347
342/* 348/*
343 * fsnotify_d_instantiate - instantiate a dentry for inode 349 * fsnotify_d_instantiate - instantiate a dentry for inode
344 * Called with dcache_lock held.
345 */ 350 */
346static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) 351static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode)
347{ 352{
348 if (!inode) 353 if (!inode)
349 return; 354 return;
350 355
351 assert_spin_locked(&dcache_lock);
352
353 spin_lock(&dentry->d_lock); 356 spin_lock(&dentry->d_lock);
354 __fsnotify_update_dcache_flags(dentry); 357 __fsnotify_update_dcache_flags(dentry);
355 spin_unlock(&dentry->d_lock); 358 spin_unlock(&dentry->d_lock);