From: Kent Overstreet Date: Mon, 30 Nov 2015 01:18:33 +0000 (-0800) Subject: bcache: Add a cond_resched() call to gc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5f1e5adf956e3ba82d204c7c141a75da9fa449a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bcache: Add a cond_resched() call to gc Signed-off-by: Takashi Iwai Tested-by: Eric Wheeler Cc: Kent Overstreet Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe --- 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!");