diff options
author | Lino Sanfilippo <LinoSanfilippo@gmx.de> | 2011-06-14 17:29:50 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-12-11 13:29:46 -0500 |
commit | 986ab09807ca9454c3f54aae4db7e1bb00daeed3 (patch) | |
tree | d6b76b03624a2d95a73ba88d990cd5210ab9eb20 /fs/notify/inode_mark.c | |
parent | 6dfbd149946c22c2e2886d6b560def78630c8387 (diff) | |
download | linux-986ab09807ca9454c3f54aae4db7e1bb00daeed3.tar.gz linux-986ab09807ca9454c3f54aae4db7e1bb00daeed3.tar.bz2 linux-986ab09807ca9454c3f54aae4db7e1bb00daeed3.zip |
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/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index b13c00ac48eb..4e9071e37d5d 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -63,8 +63,8 @@ void fsnotify_destroy_inode_mark(struct fsnotify_mark *mark) { struct inode *inode = mark->i.inode; + BUG_ON(!mutex_is_locked(&mark->group->mark_mutex)); assert_spin_locked(&mark->lock); - assert_spin_locked(&mark->group->mark_lock); spin_lock(&inode->i_lock); @@ -191,8 +191,8 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark, mark->flags |= FSNOTIFY_MARK_FLAG_INODE; + BUG_ON(!mutex_is_locked(&group->mark_mutex)); assert_spin_locked(&mark->lock); - assert_spin_locked(&group->mark_lock); spin_lock(&inode->i_lock); |