diff options
author | Lino Sanfilippo <LinoSanfilippo@gmx.de> | 2011-06-14 19:29:50 +0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-12-11 22:29:46 +0400 |
commit | 986ab09807ca9454c3f54aae4db7e1bb00daeed3 (patch) | |
tree | d6b76b03624a2d95a73ba88d990cd5210ab9eb20 /fs/notify/vfsmount_mark.c | |
parent | 6dfbd149946c22c2e2886d6b560def78630c8387 (diff) | |
download | linux-986ab09807ca9454c3f54aae4db7e1bb00daeed3.tar.xz |
fsnotify: use a mutex instead of a spinlock to protect a groups mark list
Replaces the groups mark_lock spinlock with a mutex. Using a mutex instead
of a spinlock results in more flexibility (i.e it allows to sleep while the
lock is held).
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/vfsmount_mark.c')
-rw-r--r-- | fs/notify/vfsmount_mark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c index b7b4b0e8554f..f26a348827f8 100644 --- a/fs/notify/vfsmount_mark.c +++ b/fs/notify/vfsmount_mark.c @@ -88,8 +88,8 @@ void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark) { struct vfsmount *mnt = mark->m.mnt; + BUG_ON(!mutex_is_locked(&mark->group->mark_mutex)); assert_spin_locked(&mark->lock); - assert_spin_locked(&mark->group->mark_lock); spin_lock(&mnt->mnt_root->d_lock); @@ -151,8 +151,8 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark, mark->flags |= FSNOTIFY_MARK_FLAG_VFSMOUNT; + BUG_ON(!mutex_is_locked(&group->mark_mutex)); assert_spin_locked(&mark->lock); - assert_spin_locked(&group->mark_lock); spin_lock(&mnt->mnt_root->d_lock); |