Commit 7f81947b authored by Frank Pavlic's avatar Frank Pavlic Committed by Jeff Garzik

[PATCH] s390: schedule_timeout cleanup in ctctty

[patch 4/10] s390: schedule_timeout cleanup in ctctty.

From: Domen Puncer <domen@coderock.org>

Use msleep_interruptible() instead of schedule_timeout()
to guarantee the task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarFrank Pavlic <pavlic@de.ibm.com>
Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent b5f9d55b
/* /*
* $Id: ctctty.c,v 1.26 2004/08/04 11:06:55 mschwide Exp $ * $Id: ctctty.c,v 1.29 2005/04/05 08:50:44 mschwide Exp $
* *
* CTC / ESCON network driver, tty interface. * CTC / ESCON network driver, tty interface.
* *
...@@ -1056,8 +1056,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -1056,8 +1056,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
info->tty = 0; info->tty = 0;
tty->closing = 0; tty->closing = 0;
if (info->blocked_open) { if (info->blocked_open) {
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(500);
schedule_timeout(HZ/2);
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} }
info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING); info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment