[PATCH 3.14 007/130] bcache: Add a cond_resched() call to gc
From: Greg Kroah-Hartman
Date: Tue Mar 01 2016 - 21:11:41 EST
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kent Overstreet <kmo@xxxxxxxxxxxxx>
commit c5f1e5adf956e3ba82d204c7c141a75da9fa449a upstream.
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Tested-by: Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx>
Cc: Kent Overstreet <kmo@xxxxxxxxxxxxx>
Signed-off-by: Jens Axboe <axboe@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/md/bcache/btree.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1641,6 +1641,7 @@ static void bch_btree_gc(struct cache_se
do {
ret = btree_root(gc_root, c, &op, &writes, &stats);
closure_sync(&writes);
+ cond_resched();
if (ret && ret != -EAGAIN)
pr_warn("gc failed!");