Skip to content

Commit

Permalink
[PATCH] tty: remove useless memory barrier
Browse files Browse the repository at this point in the history
I don't see why there is a memory barrier in copy_from_read_buf() at all.
Even if it was useful spin_unlock_irqrestore implies a barrier.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ralf Baechle authored and Linus Torvalds committed Dec 13, 2006
1 parent cd86128 commit 34f8f0a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty_struct *tty,
n = min(*nr, n);
spin_unlock_irqrestore(&tty->read_lock, flags);
if (n) {
mb();
retval = copy_to_user(*b, &tty->read_buf[tty->read_tail], n);
n -= retval;
spin_lock_irqsave(&tty->read_lock, flags);
Expand Down

0 comments on commit 34f8f0a

Please sign in to comment.