n_tty: Don't wait for buffer work in read() loop
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:14:29 +0000 (09:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:43:02 +0000 (16:43 -0700)
User-space read() can run concurrently with receiving from device;
waiting for receive_buf() to complete is not required.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c

index fe1c39992c51102bbcc4ffcb2aa77e933ed4089a..a6eea30d091109353979a1f7ab30a533cdfb35b8 100644 (file)
@@ -1724,7 +1724,6 @@ static inline int input_available_p(struct tty_struct *tty, int amt)
 {
        struct n_tty_data *ldata = tty->disc_data;
 
-       tty_flush_to_ldisc(tty);
        if (ldata->icanon && !L_EXTPROC(tty)) {
                if (ldata->canon_head != ldata->read_tail)
                        return 1;