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

Function jbd2_journal_shrink_checkpoint_list() assumes that '0' is not a
valid value for transaction IDs, which is incorrect.

Furthermore, the sbi->s_fc_ineligible_tid handling also makes the same
assumption by being initialised to '0'.  Fortunately, the sb flag
EXT4_MF_FC_INELIGIBLE can be used to check whether sbi->s_fc_ineligible_tid
has been previously set instead of comparing it with '0'.

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