From: Kent Overstreet Date: Mon, 30 Nov 2015 01:18:33 +0000 (-0800) Subject: bcache: Add a cond_resched() call to gc X-Git-Tag: firefly_0821_release~176^2~475^2~355 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f4c87d7c2e5d6d20fb35066f3ee51e4bdc467d74;p=firefly-linux-kernel-4.4.55.git bcache: Add a cond_resched() call to gc commit c5f1e5adf956e3ba82d204c7c141a75da9fa449a upstream. Signed-off-by: Takashi Iwai Tested-by: Eric Wheeler Cc: Kent Overstreet Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 4a1179cbc52e..22b9e34ceb75 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -1741,6 +1741,7 @@ static void bch_btree_gc(struct cache_set *c) do { ret = btree_root(gc_root, c, &op, &writes, &stats); closure_sync(&writes); + cond_resched(); if (ret && ret != -EAGAIN) pr_warn("gc failed!");