patch-2.2.0-pre8 linux/drivers/char/n_tty.c

Next file: linux/drivers/char/pc_keyb.c
Previous file: linux/drivers/char/msp3400.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
@@ -922,10 +922,10 @@
 		}
 	}
 
-	add_wait_queue(&tty->read_wait, &wait);
-
 	if (down_interruptible(&tty->atomic_read))
 		return -ERESTARTSYS;
+
+	add_wait_queue(&tty->read_wait, &wait);
 	set_bit(TTY_DONT_FLIP, &tty->flags);
 	while (nr) {
 		/* First test for status change. */

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