]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
[PATCH] s390: schedule_timeout cleanup in ctctty
authorFrank Pavlic <pavlic@de.ibm.com>
Thu, 12 May 2005 18:36:22 +0000 (20:36 +0200)
committerJeff Garzik <jgarzik@pobox.com>
Sun, 15 May 2005 22:06:16 +0000 (18:06 -0400)
[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: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/net/ctctty.c

index 9257d60c78330478bca8a05280fda54054ceb9c4..3080393e823db43117d22a6bd73adf7cfdcc6013 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $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)
        info->tty = 0;
        tty->closing = 0;
        if (info->blocked_open) {
        info->tty = 0;
        tty->closing = 0;
        if (info->blocked_open) {
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(HZ/2);
+               msleep_interruptible(500);
                wake_up_interruptible(&info->open_wait);
        }
        info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);
                wake_up_interruptible(&info->open_wait);
        }
        info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);