]> www.infradead.org Git - users/dwmw2/linux.git/commit
ext4: prevent an infinite loop in the lazyinit thread
authorMathieu Othacehe <othacehe@gnu.org>
Wed, 6 Nov 2024 13:47:41 +0000 (14:47 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 13 Nov 2024 17:56:48 +0000 (12:56 -0500)
commite06a8c24f6445c2f1b5255caa4f63b38e31c43fa
treeb851d6360453ab4ba7acd80f9153fddb14dc0000
parentd5e9836e13a53ef36af702d87ab20d1a126b0fb8
ext4: prevent an infinite loop in the lazyinit thread

Use ktime_get_ns instead of ktime_get_real_ns when computing the lr_timeout
not to be affected by system time jumps.

Use a boolean instead of the MAX_JIFFY_OFFSET value to determine whether
the next_wakeup value has been set. Comparing elr->lr_next_sched to
MAX_JIFFY_OFFSET can cause the lazyinit thread to loop indefinitely.

Co-developed-by: Lukas Skupinski <lukas.skupinski@landisgyr.com>
Signed-off-by: Lukas Skupinski <lukas.skupinski@landisgyr.com>
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20241106134741.26948-2-othacehe@gnu.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c