aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
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 fcdb59f9ca91..675229b93718 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -354,14 +354,14 @@ static void bch_data_insert_start(struct closure *cl)
354 struct data_insert_op *op = container_of(cl, struct data_insert_op, cl); 354 struct data_insert_op *op = container_of(cl, struct data_insert_op, cl);
355 struct bio *bio = op->bio, *n; 355 struct bio *bio = op->bio, *n;
356 356
357 if (op->bypass)
358 return bch_data_invalidate(cl);
359
360 if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) { 357 if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) {
361 set_gc_sectors(op->c); 358 set_gc_sectors(op->c);
362 wake_up_gc(op->c); 359 wake_up_gc(op->c);
363 } 360 }
364 361
362 if (op->bypass)
363 return bch_data_invalidate(cl);
364
365 /* 365 /*
366 * Journal writes are marked REQ_FLUSH; if the original write was a 366 * Journal writes are marked REQ_FLUSH; if the original write was a
367 * flush, it'll wait on the journal write. 367 * flush, it'll wait on the journal write.