summaryrefslogtreecommitdiffstats
path: root/fs/notify/vfsmount_mark.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 16:18:38 +0200
committerEric Paris <eparis@redhat.com>2010-07-28 16:18:51 +0200
commita4c6e9961fcb9da54648d98978d33c6fdcb7bb45 (patch)
treea109069ccd818ce9fd84f1ef1f0234e8452eb317 /fs/notify/vfsmount_mark.c
parentfsnotify: place marks on object in order of group memory address (diff)
downloadlinux-a4c6e9961fcb9da54648d98978d33c6fdcb7bb45.tar.xz
linux-a4c6e9961fcb9da54648d98978d33c6fdcb7bb45.zip
fsnotify: use _rcu functions for mark list traversal
In preparation for srcu locking use all _rcu appropiete functions for mark list addition, removal, and traversal. The operations are still done under a spinlock at the end of this patch. Signed-off-by: Eric Paris <eparis@redhat.com>
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)
spin_lock(&mnt->mnt_root->d_lock);
hlist_for_each_entry_safe(mark, pos, n, &mnt->mnt_fsnotify_marks, m.m_list) {
list_add(&mark->m.free_m_list, &free_list);
- hlist_del_init(&mark->m.m_list);
+ hlist_del_init_rcu(&mark->m.m_list);
fsnotify_get_mark(mark);
}
spin_unlock(&mnt->mnt_root->d_lock);
@@ -91,7 +91,7 @@ void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
spin_lock(&mnt->mnt_root->d_lock);
- hlist_del_init(&mark->m.m_list);
+ hlist_del_init_rcu(&mark->m.m_list);
mark->m.mnt = NULL;
fsnotify_recalc_vfsmount_mask_locked(mnt);
@@ -156,7 +156,7 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
/* is mark the first mark? */
if (hlist_empty(&mnt->mnt_fsnotify_marks)) {
- hlist_add_head(&mark->m.m_list, &mnt->mnt_fsnotify_marks);
+ hlist_add_head_rcu(&mark->m.m_list, &mnt->mnt_fsnotify_marks);
goto out;
}
@@ -172,13 +172,13 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
if (mark->group < lmark->group)
continue;
- hlist_add_before(&mark->m.m_list, &lmark->m.m_list);
+ hlist_add_before_rcu(&mark->m.m_list, &lmark->m.m_list);
goto out;
}
BUG_ON(last == NULL);
/* mark should be the last entry. last is the current last entry */
- hlist_add_after(last, &mark->m.m_list);
+ hlist_add_after_rcu(last, &mark->m.m_list);
out:
fsnotify_recalc_vfsmount_mask_locked(mnt);
spin_unlock(&mnt->mnt_root->d_lock);