summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2014-01-30 20:57:55 +0100
committerJens Axboe <axboe@kernel.dk>2014-01-30 20:57:55 +0100
commit96d2e8b5e288e9d2a40b95161b855944846526a5 (patch)
tree1fba4e0da90fb2727ba1c121d76dd363c29759f2 /drivers/md/bcache/request.c
parentblock: __elv_next_request() shouldn't call into the elevator if bypassing (diff)
parentbcache: bugfix - gc thread now gets woken when cache is full (diff)
downloadlinux-96d2e8b5e288e9d2a40b95161b855944846526a5.tar.xz
linux-96d2e8b5e288e9d2a40b95161b855944846526a5.zip
Merge branch 'bcache-for-3.14' of git://evilpiepirate.org/~kent/linux-bcache into for-linus
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 72cd213f213f..5d5d031cf381 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -353,14 +353,14 @@ static void bch_data_insert_start(struct closure *cl)
struct data_insert_op *op = container_of(cl, struct data_insert_op, cl);
struct bio *bio = op->bio, *n;
- if (op->bypass)
- return bch_data_invalidate(cl);
-
if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) {
set_gc_sectors(op->c);
wake_up_gc(op->c);
}
+ if (op->bypass)
+ return bch_data_invalidate(cl);
+
/*
* Journal writes are marked REQ_FLUSH; if the original write was a
* flush, it'll wait on the journal write.