* [PATCH] Remove useless memory barrier.
@ 2006-12-08 0:41 Ralf Baechle
0 siblings, 0 replies; only message in thread
From: Ralf Baechle @ 2006-12-08 0:41 UTC (permalink / raw)
To: linux-kernel
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>
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 603b9ad..8df7ff3 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -1151,7 +1151,6 @@ static int copy_from_read_buf(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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-08 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 0:41 [PATCH] Remove useless memory barrier Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox