patch-2.0.34 linux/drivers/char/tty_io.c

Next file: linux/drivers/char/wdt.c
Previous file: linux/drivers/char/tga.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.33/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -1163,6 +1163,10 @@
 		}
 	}
 #endif
+
+	if (tty->driver.close)
+		tty->driver.close(tty, filp);
+
 	/*
 	 * Sanity check: if tty->count is going to zero, there shouldn't be
 	 * any waiters on tty->read_wait or tty->write_wait.  We test the
@@ -1219,9 +1223,6 @@
 	 * both sides, and we've completed the last operation that could 
 	 * block, so it's safe to proceed with closing.
 	 */
-
-	if (tty->driver.close)
-		tty->driver.close(tty, filp);
 
 	if (pty_master) {
 		if (--o_tty->count < 0) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov