]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: fix incorrect tid assumption in jbd2_journal_shrink_checkpoint_list()
authorLuis Henriques (SUSE) <luis.henriques@linux.dev>
Wed, 24 Jul 2024 16:11:17 +0000 (17:11 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Aug 2024 03:39:48 +0000 (23:39 -0400)
commit7a6443e1dad70281f99f0bd394d7fd342481a632
treec9f699d0e6f33b76d1af75d5e0f9ed9873a264d7
parent972090651ee15e51abfb2160e986fa050cfc7a40
ext4: fix incorrect tid assumption in jbd2_journal_shrink_checkpoint_list()

Function jbd2_journal_shrink_checkpoint_list() assumes that '0' is not a
valid value for transaction IDs, which is incorrect.  Don't assume that and
use two extra boolean variables to control the loop iterations and keep
track of the first and last tid.

Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240724161119.13448-4-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/jbd2/checkpoint.c