Skip to content

Commit

Permalink
ext4: fix lazyinit hang after removing request
Browse files Browse the repository at this point in the history
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: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed Nov 2, 2010
1 parent c8ddb27 commit f4245bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2740,7 +2740,8 @@ static int ext4_lazyinit_thread(void *arg)
if (freezing(current))
refrigerator();

if (time_after_eq(jiffies, next_wakeup)) {
if ((time_after_eq(jiffies, next_wakeup)) ||
(MAX_JIFFY_OFFSET == next_wakeup)) {
cond_resched();
continue;
}
Expand Down

0 comments on commit f4245bd

Please sign in to comment.