summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@openvz.org>2018-04-06 10:21:08 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2018-04-06 10:21:08 +1000
commit7f69df96826d8bc5cdb44034fcef2b21186bf5b9 (patch)
tree124a8149b5608ad2eb72bfbb8051343ff3148d1a /fs
parent4a9ec58fe5adbc9cdc1db2b30220b65ff73b2a59 (diff)
autofs4: use wake_up() instead of wake_up_interruptible
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(). In CRIU, we have the autofs test: https://github.com/checkpoint-restore/criu/blob/master/test/zdtm/static/autofs.c We run CRIU tests on the linux-next kernels and a few days ago this test started to fail, actually it hangs up. I found that wake_up_interruptible() doesn't wake up a thread, which is waiting. try_to_wake_up() has the argument "state", it is the mask of task states that can be woken. For wake_up_interruptible(), state is TASK_INTERRUPTIBLE. For wake_up(). state is TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) If we use wait_event_killable(), the task sleeps in the TASK_KILLABLE state, so wake_up_interruptible() isn't suitable in this case. #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) I checked that our test passes with this patch. I mean that we had a real problem and we checked that it is fixed by this patch. Link: http://lkml.kernel.org/r/20180331022839.21277-1-avagin@openvz.org Signed-off-by: Andrei Vagin <avagin@openvz.org> Acked-by: Ian Kent <raven@themaw.net> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'fs')
-rw-r--r--fs/autofs4/waitq.c2
1 files changed, 1 insertions, 1 deletions
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);