diff options
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 154f42203b05..371631f4bfb9 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -1538,7 +1538,8 @@ static unsigned int normal_poll(struct tty_struct * tty, struct file * file, pol | |||
1538 | else | 1538 | else |
1539 | tty->minimum_to_wake = 1; | 1539 | tty->minimum_to_wake = 1; |
1540 | } | 1540 | } |
1541 | if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS && | 1541 | if (!tty_is_writelocked(tty) && |
1542 | tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS && | ||
1542 | tty->driver->write_room(tty) > 0) | 1543 | tty->driver->write_room(tty) > 0) |
1543 | mask |= POLLOUT | POLLWRNORM; | 1544 | mask |= POLLOUT | POLLWRNORM; |
1544 | return mask; | 1545 | return mask; |