Re: [PATCH v2 1/7] fsnotify: clean up fsnotify_prepare/finish_user_wait()
From: Miklos Szeredi
Date: Wed Oct 25 2017 - 10:15:30 EST
On Wed, Oct 25, 2017 at 2:07 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>>> -bool fsnotify_prepare_user_wait(struct fsnotify_iter_info *iter_info)
>>> +/*
>>> + * Get mark reference when we found the mark via lockless traversal of object
>>> + * list. Mark can be already removed from the list by now and on its way to be
>>> + * destroyed once SRCU period ends.
>>> + */
>>> +static bool fsnotify_get_mark_safe(struct fsnotify_mark *mark)
>
> Sorry, hit send too soon...
> This helper is now more than "get mark safe"
> how about fsnotify_get_mark_wait() to pair with fsnotify_put_mark_wait()?
It's get mark and pin mark->group. I think "safe" describes that
adequately. Added comments to reflect that.
Also renamed fsnotify_put_mark_wait() to fsnotify_put_mark_wake(),
because that's what it does.
Thanks,
Miklos