aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/fsnotify.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:38 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:52 -0400
commit75c1be487a690db43da2c1234fcacd84c982803c (patch)
treeb38ce47f157d3b0eff7ac6eb4756a4b390ac35ae /fs/notify/fsnotify.h
parent700307a29ad61090dcf1d45f8f4a135f5e9211ae (diff)
fsnotify: srcu to protect read side of inode and vfsmount locks
Currently reading the inode->i_fsnotify_marks or vfsmount->mnt_fsnotify_marks lists are protected by a spinlock on both the read and the write side. This patch protects the read side of those lists with a new single srcu. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fsnotify.h')
-rw-r--r--fs/notify/fsnotify.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
index 1be54f6f9e7d..7eed86f942ba 100644
--- a/fs/notify/fsnotify.h
+++ b/fs/notify/fsnotify.h
@@ -6,8 +6,6 @@
6#include <linux/srcu.h> 6#include <linux/srcu.h>
7#include <linux/types.h> 7#include <linux/types.h>
8 8
9/* protects reads of fsnotify_groups */
10extern struct srcu_struct fsnotify_grp_srcu;
11/* all groups which receive inode fsnotify events */ 9/* all groups which receive inode fsnotify events */
12extern struct list_head fsnotify_inode_groups; 10extern struct list_head fsnotify_inode_groups;
13/* all groups which receive vfsmount fsnotify events */ 11/* all groups which receive vfsmount fsnotify events */
@@ -20,6 +18,9 @@ extern __u32 fsnotify_vfsmount_mask;
20/* destroy all events sitting in this groups notification queue */ 18/* destroy all events sitting in this groups notification queue */
21extern void fsnotify_flush_notify(struct fsnotify_group *group); 19extern void fsnotify_flush_notify(struct fsnotify_group *group);
22 20
21/* protects reads of inode and vfsmount marks list */
22extern struct srcu_struct fsnotify_mark_srcu;
23
23extern void fsnotify_set_inode_mark_mask_locked(struct fsnotify_mark *fsn_mark, 24extern void fsnotify_set_inode_mark_mask_locked(struct fsnotify_mark *fsn_mark,
24 __u32 mask); 25 __u32 mask);
25/* add a mark to an inode */ 26/* add a mark to an inode */