]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ext4: fix lazyinit hang after removing request
authorLukas Czerner <lczerner@redhat.com>
Tue, 2 Nov 2010 18:07:17 +0000 (14:07 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 2 Nov 2010 18:07:17 +0000 (14:07 -0400)
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>
fs/ext4/super.c

index 40131b777af66c3112bb1df16265faadac435d0f..8d1d9423ce9a61dfd3bbff7bce085b45aa9ab574 100644 (file)
@@ -2740,7 +2740,8 @@ cont_thread:
                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;
                }