summaryrefslogtreecommitdiff
path: root/fs/notify/fanotify/fanotify_user.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-10-07 23:57:01 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-08 01:46:26 (GMT)
commited2726406c6a71f5da63719c0ba7d9e21dd9581c (patch)
tree8443da5c76097a56a635a4a5c834998498a99c01 /fs/notify/fanotify/fanotify_user.c
parent0b1b86527df4b1f398266c23e926dd788925bb69 (diff)
downloadlinux-ed2726406c6a71f5da63719c0ba7d9e21dd9581c.tar.xz
fsnotify: clean up spinlock assertions
Use assert_spin_locked() macro instead of hand-made BUG_ON statements. Link: http://lkml.kernel.org/r/1474537439-18919-1-git-send-email-jack@suse.cz Signed-off-by: Jan Kara <jack@suse.cz> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/notify/fanotify/fanotify_user.c')
-rw-r--r--fs/notify/fanotify/fanotify_user.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 189fab3..7ebfca6 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -54,8 +54,7 @@ struct kmem_cache *fanotify_perm_event_cachep __read_mostly;
static struct fsnotify_event *get_one_event(struct fsnotify_group *group,
size_t count)
{
- BUG_ON(IS_ENABLED(CONFIG_SMP) &&
- !spin_is_locked(&group->notification_lock));
+ assert_spin_locked(&group->notification_lock);
pr_debug("%s: group=%p count=%zd\n", __func__, group, count);