Commit 34f8f0a5 authored by Ralf Baechle's avatar Ralf Baechle Committed by Linus Torvalds

[PATCH] tty: remove useless memory barrier

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: default avatarRalf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cd861280
...@@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty_struct *tty, ...@@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty_struct *tty,
n = min(*nr, n); n = min(*nr, n);
spin_unlock_irqrestore(&tty->read_lock, flags); spin_unlock_irqrestore(&tty->read_lock, flags);
if (n) { if (n) {
mb();
retval = copy_to_user(*b, &tty->read_buf[tty->read_tail], n); retval = copy_to_user(*b, &tty->read_buf[tty->read_tail], n);
n -= retval; n -= retval;
spin_lock_irqsave(&tty->read_lock, flags); spin_lock_irqsave(&tty->read_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment