On Tue, Jan 8, 2019 at 6:46 PM Jan Kara <jack@xxxxxxx> wrote: > > get_one_event() has a single caller and that just locks > notification_lock around the call. Move locking inside get_one_event() > as that will make using ->response field for permission event state > easier. > > Signed-off-by: Jan Kara <jack@xxxxxxx> > --- > fs/notify/fanotify/fanotify_user.c | 26 +++++++++++--------------- > 1 file changed, 11 insertions(+), 15 deletions(-) > > diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c > index 908ebc421d15..2b2c8b8a17bd 100644 > --- a/fs/notify/fanotify/fanotify_user.c > +++ b/fs/notify/fanotify/fanotify_user.c > @@ -51,25 +51,24 @@ struct kmem_cache *fanotify_perm_event_cachep __read_mostly; > * Get an fsnotify notification event if one exists and is small > * enough to fit in "count". Return an error pointer if the count > * is not large enough. > - * > - * Called with the group->notification_lock held. > */ > static struct fsnotify_event *get_one_event(struct fsnotify_group *group, > size_t count) > { > - assert_spin_locked(&group->notification_lock); > - > - pr_debug("%s: group=%p count=%zd\n", __func__, group, count); I see you are slowly cleaning up pr_debug calls. Any particular reason? Out of all the spam pr_debug calls in the code, this one looks rather useful. Otherwise, looks ok. Thanks, Amir.