Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17875
b: refs/heads/master
c: 607f4e3
h: refs/heads/master
i:
  17873: 454b31a
  17871: c2b4046
v: v3
  • Loading branch information
Paul Fulghum authored and Linus Torvalds committed Jan 12, 2006
1 parent f89ad85 commit 903eb1a
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 4cec87361462d570d6a67888feda41e77e0a9562
refs/heads/master: 607f4e3864a4306be0d0ad11ff34284c239aad1b
6 changes: 3 additions & 3 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size)

int tty_buffer_request_room(struct tty_struct *tty, size_t size)
{
struct tty_buffer *b = tty->buf.head, *n;
struct tty_buffer *b = tty->buf.tail, *n;
int left = 0;

/* OPTIMISATION: We could keep a per tty "zero" sized buffer to
Expand All @@ -326,7 +326,6 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size)
n = tty_buffer_find(tty, size);
if(n == NULL)
return left;
n->next = b;
if(b != NULL)
b->next = n;
else
Expand Down Expand Up @@ -2751,6 +2750,8 @@ static void flush_to_ldisc(void *private_)
spin_lock_irqsave(&tty->read_lock, flags);
while((tbuf = tty->buf.head) != NULL) {
tty->buf.head = tbuf->next;
if (tty->buf.head == NULL)
tty->buf.tail = NULL;
spin_unlock_irqrestore(&tty->read_lock, flags);
/* printk("Process buffer %p for %d\n", tbuf, tbuf->used); */
disc->receive_buf(tty, tbuf->char_buf_ptr,
Expand All @@ -2759,7 +2760,6 @@ static void flush_to_ldisc(void *private_)
spin_lock_irqsave(&tty->read_lock, flags);
tty_buffer_free(tty, tbuf);
}
tty->buf.tail = NULL;
spin_unlock_irqrestore(&tty->read_lock, flags);
out:
tty_ldisc_deref(disc);
Expand Down

0 comments on commit 903eb1a

Please sign in to comment.