Author: marcel
Date: Thu Oct  9 01:59:25 2014
New Revision: 272786
URL: https://svnweb.freebsd.org/changeset/base/272786

Log:
  Apply r269126 to tty_timedwait():
  Don't return ERESTART when the device is gone.

Modified:
  head/sys/kern/tty.c

Modified: head/sys/kern/tty.c
==============================================================================
--- head/sys/kern/tty.c Thu Oct  9 01:54:32 2014        (r272785)
+++ head/sys/kern/tty.c Thu Oct  9 01:59:25 2014        (r272786)
@@ -1392,14 +1392,14 @@ tty_timedwait(struct tty *tp, struct cv 
 
        error = cv_timedwait_sig(cv, tp->t_mtx, hz);
 
-       /* Restart the system call when we may have been revoked. */
-       if (tp->t_revokecnt != revokecnt)
-               return (ERESTART);
-
        /* Bail out when the device slipped away. */
        if (tty_gone(tp))
                return (ENXIO);
 
+       /* Restart the system call when we may have been revoked. */
+       if (tp->t_revokecnt != revokecnt)
+               return (ERESTART);
+
        return (error);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to