]> git.ipfire.org Git - thirdparty/linux.git/commit
printk_ringbuffer: don't needlessly wrap data blocks around
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Fri, 5 Sep 2025 14:41:51 +0000 (17:41 +0300)
committerPetr Mladek <pmladek@suse.com>
Wed, 22 Oct 2025 12:03:36 +0000 (14:03 +0200)
commit67e1b0052f6bb82be84e30a5af7d27f29533a83b
tree8c33e35e325c594ef78d159a3c10095b15c674db
parent48e3694ae7fae347c1193c84f384f4ea41086075
printk_ringbuffer: don't needlessly wrap data blocks around

Previously, data blocks that perfectly fit the data ring buffer would
get wrapped around to the beginning for no reason since the calculated
offset of the next data block would belong to the next wrap. Since this
offset is not actually part of the data block, but rather the offset of
where the next data block is going to start, there is no reason to
include it when deciding whether the current block fits the buffer.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Tested-by: John Ogness <john.ogness@linutronix.de>
Link: https://patch.msgid.link/20250905144152.9137-2-d-tatianin@yandex-team.ru
[pmladek@suse.com: Updated indentation.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk_ringbuffer.c