diff options
Diffstat (limited to 'fs/notify/fsnotify.c')
-rw-r--r-- | fs/notify/fsnotify.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index eae621a18ac9..d512ef9f75fc 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c | |||
@@ -228,7 +228,8 @@ int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is, | |||
228 | 228 | ||
229 | if ((mask & FS_MODIFY) || | 229 | if ((mask & FS_MODIFY) || |
230 | (test_mask & to_tell->i_fsnotify_mask)) { | 230 | (test_mask & to_tell->i_fsnotify_mask)) { |
231 | inode_conn = lockless_dereference(to_tell->i_fsnotify_marks); | 231 | inode_conn = srcu_dereference(to_tell->i_fsnotify_marks, |
232 | &fsnotify_mark_srcu); | ||
232 | if (inode_conn) | 233 | if (inode_conn) |
233 | inode_node = srcu_dereference(inode_conn->list.first, | 234 | inode_node = srcu_dereference(inode_conn->list.first, |
234 | &fsnotify_mark_srcu); | 235 | &fsnotify_mark_srcu); |
@@ -236,11 +237,13 @@ int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is, | |||
236 | 237 | ||
237 | if (mnt && ((mask & FS_MODIFY) || | 238 | if (mnt && ((mask & FS_MODIFY) || |
238 | (test_mask & mnt->mnt_fsnotify_mask))) { | 239 | (test_mask & mnt->mnt_fsnotify_mask))) { |
239 | inode_conn = lockless_dereference(to_tell->i_fsnotify_marks); | 240 | inode_conn = srcu_dereference(to_tell->i_fsnotify_marks, |
241 | &fsnotify_mark_srcu); | ||
240 | if (inode_conn) | 242 | if (inode_conn) |
241 | inode_node = srcu_dereference(inode_conn->list.first, | 243 | inode_node = srcu_dereference(inode_conn->list.first, |
242 | &fsnotify_mark_srcu); | 244 | &fsnotify_mark_srcu); |
243 | vfsmount_conn = lockless_dereference(mnt->mnt_fsnotify_marks); | 245 | vfsmount_conn = srcu_dereference(mnt->mnt_fsnotify_marks, |
246 | &fsnotify_mark_srcu); | ||
244 | if (vfsmount_conn) | 247 | if (vfsmount_conn) |
245 | vfsmount_node = srcu_dereference( | 248 | vfsmount_node = srcu_dereference( |
246 | vfsmount_conn->list.first, | 249 | vfsmount_conn->list.first, |