From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbeDACBv (ORCPT ); Sat, 31 Mar 2018 22:01:51 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50571 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754AbeDACBt (ORCPT ); Sat, 31 Mar 2018 22:01:49 -0400 X-ME-Sender: Subject: Re: [PATCH] autofs4: use wake_up() instead of wake_up_interruptible From: Ian Kent To: Andrei Vagin Cc: autofs@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , Andrew Morton , Stephen Rothwell References: <20180331022839.21277-1-avagin@openvz.org> Message-ID: <8d578e49-c1a0-a38d-3b91-f0a07de0089b@themaw.net> Date: Sun, 1 Apr 2018 10:01:41 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/18 09:31, Ian Kent wrote: > 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. Ok, so that 1 is the number of exclusive waiters. So what is the difference between the two wake_up calls in this case? > > 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 >> Cc: Ian Kent >> Cc: Andrew Morton >> Cc: Stephen Rothwell >> Signed-off-by: Andrei Vagin >> --- >> 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); >> >