bcache: Fix a dumb CPU spinning bug in writeback
authorKent Overstreet <kmo@daterainc.com>
Tue, 24 Sep 2013 06:17:33 +0000 (23:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2013 14:13:09 +0000 (07:13 -0700)
commit 79e3dab90d9f826ceca67c7890e048ac9169de49 upstream.

schedule_timeout() != schedule_timeout_uninterruptible()

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/bcache/writeback.c

index 12c0cd135ef850c93a0a51a89f325842195ec434..841f0490d4efd3fe23d20138bb10880f4edad941 100644 (file)
@@ -327,8 +327,7 @@ static void read_dirty(struct closure *cl)
                if (delay > 0 &&
                    (KEY_START(&w->key) != dc->last_read ||
                     jiffies_to_msecs(delay) > 50))
-                       while (delay)
-                               delay = schedule_timeout(delay);
+                       delay = schedule_timeout_uninterruptible(delay);
 
                dc->last_read   = KEY_OFFSET(&w->key);