Commit f4245bd4 authored by Lukas Czerner's avatar Lukas Czerner Committed by Theodore Ts'o

ext4: fix lazyinit hang after removing request

When the request has been removed from the list and no other request
has been issued, we will end up with next wakeup scheduled to
MAX_JIFFY_OFFSET which is bad. So check for that.
Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent c8ddb271
...@@ -2740,7 +2740,8 @@ static int ext4_lazyinit_thread(void *arg) ...@@ -2740,7 +2740,8 @@ static int ext4_lazyinit_thread(void *arg)
if (freezing(current)) if (freezing(current))
refrigerator(); refrigerator();
if (time_after_eq(jiffies, next_wakeup)) { if ((time_after_eq(jiffies, next_wakeup)) ||
(MAX_JIFFY_OFFSET == next_wakeup)) {
cond_resched(); cond_resched();
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment