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

Commit af5554f9 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

tty: buffers: Move hidden buffer index advance into outer loop



The advance of the 'read' buffer index belongs in the outer
flip buffer consume loop, with the other buffer index arithmetic.

No functional change.

Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 069f38b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,6 @@ receive_buf(struct tty_struct *tty, struct tty_buffer *head, int count)
		if (count)
			disc->ops->receive_buf(tty, p, f, count);
	}
	head->read += count;
	return count;
}

@@ -506,6 +505,7 @@ static void flush_to_ldisc(struct work_struct *work)
		count = receive_buf(tty, head, count);
		if (!count)
			break;
		head->read += count;
	}

	mutex_unlock(&buf->lock);