summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2014-01-30 12:57:55 -0700
committerJens Axboe <axboe@kernel.dk>2014-01-30 12:57:55 -0700
commit96d2e8b5e288e9d2a40b95161b855944846526a5 (patch)
tree1fba4e0da90fb2727ba1c121d76dd363c29759f2 /drivers/md/bcache/request.c
parent556ee818c06f37b2e583af0363e6b16d0e0270de (diff)
parente3b4825b85eab879b618af6ea18529ca7ab9a64f (diff)
downloadlwn-96d2e8b5e288e9d2a40b95161b855944846526a5.tar.gz
lwn-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.