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

Next file: linux/drivers/isdn/act2000/act2000_isa.c
Previous file: linux/drivers/char/stallion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.103/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -1022,6 +1022,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
@@ -1078,9 +1082,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