Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243661
b: refs/heads/master
c: a5660b4
h: refs/heads/master
i:
  243659: c949413
v: v3
  • Loading branch information
Linus Torvalds committed Apr 4, 2011
1 parent a73d42c commit 19dc4a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7c764c4c7b782c660b4600b0bff2e3509892a4d
refs/heads/master: a5660b41af6a28f8004e70eb261e1202ad55c5e3
6 changes: 6 additions & 0 deletions trunk/drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static void n_tty_set_room(struct tty_struct *tty)
{
/* tty->read_cnt is not read locked ? */
int left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
int old_left;

/*
* If we are doing input canonicalization, and there are no
Expand All @@ -104,7 +105,12 @@ static void n_tty_set_room(struct tty_struct *tty)
*/
if (left <= 0)
left = tty->icanon && !tty->canon_data;
old_left = tty->receive_room;
tty->receive_room = left;

/* Did this open up the receive buffer? We may need to flip */
if (left && !old_left)
schedule_work(&tty->buf.work);
}

static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty)
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/tty/tty_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,8 @@ static void flush_to_ldisc(struct work_struct *work)
line discipline as we want to empty the queue */
if (test_bit(TTY_FLUSHPENDING, &tty->flags))
break;
if (!tty->receive_room || seen_tail) {
schedule_work(&tty->buf.work);
if (!tty->receive_room || seen_tail)
break;
}
if (count > tty->receive_room)
count = tty->receive_room;
char_buf = head->char_buf_ptr + head->read;
Expand Down

0 comments on commit 19dc4a0

Please sign in to comment.