aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/n_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r--drivers/char/n_tty.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index b9371d5bf790..603b9ade5eb0 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -1132,7 +1132,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt)
1132 * buffer, and once to drain the space from the (physical) beginning of 1132 * buffer, and once to drain the space from the (physical) beginning of
1133 * the buffer to head pointer. 1133 * the buffer to head pointer.
1134 * 1134 *
1135 * Called under the tty->atomic_read_lock sem and with TTY_DONT_FLIP set 1135 * Called under the tty->atomic_read_lock sem
1136 * 1136 *
1137 */ 1137 */
1138 1138
@@ -1271,7 +1271,6 @@ do_it_again:
1271 } 1271 }
1272 1272
1273 add_wait_queue(&tty->read_wait, &wait); 1273 add_wait_queue(&tty->read_wait, &wait);
1274 set_bit(TTY_DONT_FLIP, &tty->flags);
1275 while (nr) { 1274 while (nr) {
1276 /* First test for status change. */ 1275 /* First test for status change. */
1277 if (tty->packet && tty->link->ctrl_status) { 1276 if (tty->packet && tty->link->ctrl_status) {
@@ -1315,9 +1314,7 @@ do_it_again:
1315 break; 1314 break;
1316 } 1315 }
1317 n_tty_set_room(tty); 1316 n_tty_set_room(tty);
1318 clear_bit(TTY_DONT_FLIP, &tty->flags);
1319 timeout = schedule_timeout(timeout); 1317 timeout = schedule_timeout(timeout);
1320 set_bit(TTY_DONT_FLIP, &tty->flags);
1321 continue; 1318 continue;
1322 } 1319 }
1323 __set_current_state(TASK_RUNNING); 1320 __set_current_state(TASK_RUNNING);
@@ -1394,7 +1391,6 @@ do_it_again:
1394 if (time) 1391 if (time)
1395 timeout = time; 1392 timeout = time;
1396 } 1393 }
1397 clear_bit(TTY_DONT_FLIP, &tty->flags);
1398 mutex_unlock(&tty->atomic_read_lock); 1394 mutex_unlock(&tty->atomic_read_lock);
1399 remove_wait_queue(&tty->read_wait, &wait); 1395 remove_wait_queue(&tty->read_wait, &wait);
1400 1396