lkml.org 
[lkml]   [2018]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] autofs4: use wake_up() instead of wake_up_interruptible
From
Date
On 31/03/18 10:28, Andrei Vagin wrote:
> In "autofs4: use wait_event_killable", wait_event_interruptible() was
> replaced by wait_event_killable(), but in this case we have to use
> wake_up() instead of wake_up_interruptible().

Why do you believe wake_up() is needed rather than wake_up_interruptible()?

Now that I'm thinking about the wake up I'm wondering if this is in fact
what's needed. Rather, I think maybe wake_up_all() is probably the only
one that will actually do what's needed.

There's an individual wait queue for each mount, there can be multiple
waiters for a mount, they all should be woken up when the daemon signals
mount completion.

>
> Cc: Matthew Wilcox <mawilcox@microsoft.com>
> Cc: Ian Kent <raven@themaw.net>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrei Vagin <avagin@openvz.org>
> ---
> fs/autofs4/waitq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
> index c160e9b3aa0f..be9c3dc048ab 100644
> --- a/fs/autofs4/waitq.c
> +++ b/fs/autofs4/waitq.c
> @@ -549,7 +549,7 @@ int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_tok
> kfree(wq->name.name);
> wq->name.name = NULL; /* Do not wait on this queue */
> wq->status = status;
> - wake_up_interruptible(&wq->queue);
> + wake_up(&wq->queue);
> if (!--wq->wait_ctr)
> kfree(wq);
> mutex_unlock(&sbi->wq_mutex);
>

\
 
 \ /
  Last update: 2018-04-01 03:31    [W:0.256 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site