aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/vfsmount_mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/vfsmount_mark.c')
-rw-r--r--fs/notify/vfsmount_mark.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index c4b3f14d2530..b7ae64030021 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -39,7 +39,7 @@ void fsnotify_clear_marks_by_mount(struct vfsmount *mnt)
39 spin_lock(&mnt->mnt_root->d_lock); 39 spin_lock(&mnt->mnt_root->d_lock);
40 hlist_for_each_entry_safe(mark, pos, n, &mnt->mnt_fsnotify_marks, m.m_list) { 40 hlist_for_each_entry_safe(mark, pos, n, &mnt->mnt_fsnotify_marks, m.m_list) {
41 list_add(&mark->m.free_m_list, &free_list); 41 list_add(&mark->m.free_m_list, &free_list);
42 hlist_del_init(&mark->m.m_list); 42 hlist_del_init_rcu(&mark->m.m_list);
43 fsnotify_get_mark(mark); 43 fsnotify_get_mark(mark);
44 } 44 }
45 spin_unlock(&mnt->mnt_root->d_lock); 45 spin_unlock(&mnt->mnt_root->d_lock);
@@ -91,7 +91,7 @@ void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
91 91
92 spin_lock(&mnt->mnt_root->d_lock); 92 spin_lock(&mnt->mnt_root->d_lock);
93 93
94 hlist_del_init(&mark->m.m_list); 94 hlist_del_init_rcu(&mark->m.m_list);
95 mark->m.mnt = NULL; 95 mark->m.mnt = NULL;
96 96
97 fsnotify_recalc_vfsmount_mask_locked(mnt); 97 fsnotify_recalc_vfsmount_mask_locked(mnt);
@@ -156,7 +156,7 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
156 156
157 /* is mark the first mark? */ 157 /* is mark the first mark? */
158 if (hlist_empty(&mnt->mnt_fsnotify_marks)) { 158 if (hlist_empty(&mnt->mnt_fsnotify_marks)) {
159 hlist_add_head(&mark->m.m_list, &mnt->mnt_fsnotify_marks); 159 hlist_add_head_rcu(&mark->m.m_list, &mnt->mnt_fsnotify_marks);
160 goto out; 160 goto out;
161 } 161 }
162 162
@@ -172,13 +172,13 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
172 if (mark->group < lmark->group) 172 if (mark->group < lmark->group)
173 continue; 173 continue;
174 174
175 hlist_add_before(&mark->m.m_list, &lmark->m.m_list); 175 hlist_add_before_rcu(&mark->m.m_list, &lmark->m.m_list);
176 goto out; 176 goto out;
177 } 177 }
178 178
179 BUG_ON(last == NULL); 179 BUG_ON(last == NULL);
180 /* mark should be the last entry. last is the current last entry */ 180 /* mark should be the last entry. last is the current last entry */
181 hlist_add_after(last, &mark->m.m_list); 181 hlist_add_after_rcu(last, &mark->m.m_list);
182out: 182out:
183 fsnotify_recalc_vfsmount_mask_locked(mnt); 183 fsnotify_recalc_vfsmount_mask_locked(mnt);
184 spin_unlock(&mnt->mnt_root->d_lock); 184 spin_unlock(&mnt->mnt_root->d_lock);