aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inode_mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r--fs/notify/inode_mark.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c
index 83ce6db34039..455cb41c729b 100644
--- a/fs/notify/inode_mark.c
+++ b/fs/notify/inode_mark.c
@@ -67,7 +67,7 @@ void fsnotify_destroy_inode_mark(struct fsnotify_mark *mark)
67 67
68 spin_lock(&inode->i_lock); 68 spin_lock(&inode->i_lock);
69 69
70 hlist_del_init(&mark->i.i_list); 70 hlist_del_init_rcu(&mark->i.i_list);
71 mark->i.inode = NULL; 71 mark->i.inode = NULL;
72 72
73 /* 73 /*
@@ -92,7 +92,7 @@ void fsnotify_clear_marks_by_inode(struct inode *inode)
92 spin_lock(&inode->i_lock); 92 spin_lock(&inode->i_lock);
93 hlist_for_each_entry_safe(mark, pos, n, &inode->i_fsnotify_marks, i.i_list) { 93 hlist_for_each_entry_safe(mark, pos, n, &inode->i_fsnotify_marks, i.i_list) {
94 list_add(&mark->i.free_i_list, &free_list); 94 list_add(&mark->i.free_i_list, &free_list);
95 hlist_del_init(&mark->i.i_list); 95 hlist_del_init_rcu(&mark->i.i_list);
96 fsnotify_get_mark(mark); 96 fsnotify_get_mark(mark);
97 } 97 }
98 spin_unlock(&inode->i_lock); 98 spin_unlock(&inode->i_lock);
@@ -198,7 +198,7 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark,
198 198
199 /* is mark the first mark? */ 199 /* is mark the first mark? */
200 if (hlist_empty(&inode->i_fsnotify_marks)) { 200 if (hlist_empty(&inode->i_fsnotify_marks)) {
201 hlist_add_head(&mark->i.i_list, &inode->i_fsnotify_marks); 201 hlist_add_head_rcu(&mark->i.i_list, &inode->i_fsnotify_marks);
202 goto out; 202 goto out;
203 } 203 }
204 204
@@ -214,13 +214,13 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark,
214 if (mark->group < lmark->group) 214 if (mark->group < lmark->group)
215 continue; 215 continue;
216 216
217 hlist_add_before(&mark->i.i_list, &lmark->i.i_list); 217 hlist_add_before_rcu(&mark->i.i_list, &lmark->i.i_list);
218 goto out; 218 goto out;
219 } 219 }
220 220
221 BUG_ON(last == NULL); 221 BUG_ON(last == NULL);
222 /* mark should be the last entry. last is the current last entry */ 222 /* mark should be the last entry. last is the current last entry */
223 hlist_add_after(last, &mark->i.i_list); 223 hlist_add_after_rcu(last, &mark->i.i_list);
224out: 224out:
225 fsnotify_recalc_inode_mask_locked(inode); 225 fsnotify_recalc_inode_mask_locked(inode);
226 spin_unlock(&inode->i_lock); 226 spin_unlock(&inode->i_lock);