Commit e06a8c2
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>1 parent d5e9836 commit e06a8c2
1 file changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3719 | 3719 | | |
3720 | 3720 | | |
3721 | 3721 | | |
3722 | | - | |
| 3722 | + | |
3723 | 3723 | | |
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | | - | |
| 3727 | + | |
3728 | 3728 | | |
3729 | 3729 | | |
3730 | 3730 | | |
| |||
3784 | 3784 | | |
3785 | 3785 | | |
3786 | 3786 | | |
3787 | | - | |
| 3787 | + | |
3788 | 3788 | | |
| 3789 | + | |
3789 | 3790 | | |
3790 | 3791 | | |
3791 | 3792 | | |
| |||
3798 | 3799 | | |
3799 | 3800 | | |
3800 | 3801 | | |
3801 | | - | |
| 3802 | + | |
| 3803 | + | |
3802 | 3804 | | |
| 3805 | + | |
| 3806 | + | |
3803 | 3807 | | |
3804 | 3808 | | |
3805 | 3809 | | |
| |||
3827 | 3831 | | |
3828 | 3832 | | |
3829 | 3833 | | |
3830 | | - | |
| 3834 | + | |
| 3835 | + | |
3831 | 3836 | | |
| 3837 | + | |
| 3838 | + | |
3832 | 3839 | | |
3833 | 3840 | | |
3834 | 3841 | | |
3835 | 3842 | | |
3836 | 3843 | | |
3837 | 3844 | | |
3838 | | - | |
3839 | | - | |
| 3845 | + | |
3840 | 3846 | | |
3841 | 3847 | | |
3842 | 3848 | | |
| |||
0 commit comments