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: v3.14.63~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7ce521d6d1e6c2756f68f90db70f90c5e261348;p=thirdparty%2Fkernel%2Fstable.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 d5f7e682a0ec7..74a5786ddccea 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -1641,6 +1641,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!");