Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);