summaryrefslogtreecommitdiff
path: root/fs/notify
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-02-27 18:08:46 +0100
committerClark Williams <williams@redhat.com>2012-03-07 16:14:45 -0600
commit304d2a162df5f4be0548a1eb9a8fdc26223a4f2e (patch)
tree2f9ed380ed4260dab82ef87b9788b68e0f6cfe63 /fs/notify
parent695b4ff0fc943725e0fa66777596b2f86329498c (diff)
fs: dentry use seqlock
Replace the open coded seqlock with a real seqlock, so RT can handle it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/fsnotify.c8
-rw-r--r--fs/notify/vfsmount_mark.c24
2 files changed, 16 insertions, 16 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 79b47cbb5cd8..f3c5bd557a8a 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -68,19 +68,19 @@ void __fsnotify_update_child_dentry_flags(struct inode *inode)
/* run all of the children of the original inode and fix their
* d_flags to indicate parental interest (their parent is the
* original inode) */
- spin_lock(&alias->d_lock);
+ seq_spin_lock(&alias->d_lock);
list_for_each_entry(child, &alias->d_subdirs, d_u.d_child) {
if (!child->d_inode)
continue;
- spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED);
+ seq_spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED);
if (watched)
child->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
else
child->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED;
- spin_unlock(&child->d_lock);
+ seq_spin_unlock(&child->d_lock);
}
- spin_unlock(&alias->d_lock);
+ seq_spin_unlock(&alias->d_lock);
}
spin_unlock(&inode->i_lock);
}
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index 778fe6cae3b0..539dc1cdc91f 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -35,13 +35,13 @@ void fsnotify_clear_marks_by_mount(struct vfsmount *mnt)
struct hlist_node *pos, *n;
LIST_HEAD(free_list);
- spin_lock(&mnt->mnt_root->d_lock);
+ seq_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_rcu(&mark->m.m_list);
fsnotify_get_mark(mark);
}
- spin_unlock(&mnt->mnt_root->d_lock);
+ seq_spin_unlock(&mnt->mnt_root->d_lock);
list_for_each_entry_safe(mark, lmark, &free_list, m.free_m_list) {
fsnotify_destroy_mark(mark);
@@ -63,7 +63,7 @@ static void fsnotify_recalc_vfsmount_mask_locked(struct vfsmount *mnt)
struct hlist_node *pos;
__u32 new_mask = 0;
- assert_spin_locked(&mnt->mnt_root->d_lock);
+ assert_seq_spin_locked(&mnt->mnt_root->d_lock);
hlist_for_each_entry(mark, pos, &mnt->mnt_fsnotify_marks, m.m_list)
new_mask |= mark->mask;
@@ -76,9 +76,9 @@ static void fsnotify_recalc_vfsmount_mask_locked(struct vfsmount *mnt)
*/
void fsnotify_recalc_vfsmount_mask(struct vfsmount *mnt)
{
- spin_lock(&mnt->mnt_root->d_lock);
+ seq_spin_lock(&mnt->mnt_root->d_lock);
fsnotify_recalc_vfsmount_mask_locked(mnt);
- spin_unlock(&mnt->mnt_root->d_lock);
+ seq_spin_unlock(&mnt->mnt_root->d_lock);
}
void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
@@ -88,14 +88,14 @@ void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
assert_spin_locked(&mark->lock);
assert_spin_locked(&mark->group->mark_lock);
- spin_lock(&mnt->mnt_root->d_lock);
+ seq_spin_lock(&mnt->mnt_root->d_lock);
hlist_del_init_rcu(&mark->m.m_list);
mark->m.mnt = NULL;
fsnotify_recalc_vfsmount_mask_locked(mnt);
- spin_unlock(&mnt->mnt_root->d_lock);
+ seq_spin_unlock(&mnt->mnt_root->d_lock);
}
static struct fsnotify_mark *fsnotify_find_vfsmount_mark_locked(struct fsnotify_group *group,
@@ -104,7 +104,7 @@ static struct fsnotify_mark *fsnotify_find_vfsmount_mark_locked(struct fsnotify_
struct fsnotify_mark *mark;
struct hlist_node *pos;
- assert_spin_locked(&mnt->mnt_root->d_lock);
+ assert_seq_spin_locked(&mnt->mnt_root->d_lock);
hlist_for_each_entry(mark, pos, &mnt->mnt_fsnotify_marks, m.m_list) {
if (mark->group == group) {
@@ -124,9 +124,9 @@ struct fsnotify_mark *fsnotify_find_vfsmount_mark(struct fsnotify_group *group,
{
struct fsnotify_mark *mark;
- spin_lock(&mnt->mnt_root->d_lock);
+ seq_spin_lock(&mnt->mnt_root->d_lock);
mark = fsnotify_find_vfsmount_mark_locked(group, mnt);
- spin_unlock(&mnt->mnt_root->d_lock);
+ seq_spin_unlock(&mnt->mnt_root->d_lock);
return mark;
}
@@ -149,7 +149,7 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
assert_spin_locked(&mark->lock);
assert_spin_locked(&group->mark_lock);
- spin_lock(&mnt->mnt_root->d_lock);
+ seq_spin_lock(&mnt->mnt_root->d_lock);
mark->m.mnt = mnt;
@@ -184,7 +184,7 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
hlist_add_after_rcu(last, &mark->m.m_list);
out:
fsnotify_recalc_vfsmount_mask_locked(mnt);
- spin_unlock(&mnt->mnt_root->d_lock);
+ seq_spin_unlock(&mnt->mnt_root->d_lock);
return ret;
}