summaryrefslogtreecommitdiff
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.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index d1faaba6b93f..3791f98ad227 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -89,10 +89,8 @@ static void bch_data_insert_keys(struct closure *cl)
if (journal_ref)
atomic_dec_bug(journal_ref);
- if (!op->insert_data_done) {
+ if (!op->insert_data_done)
continue_at(cl, bch_data_insert_start, op->wq);
- return;
- }
bch_keylist_free(&op->insert_keys);
closure_return(cl);
@@ -217,10 +215,8 @@ static void bch_data_insert_start(struct closure *cl)
/* 1 for the device pointer and 1 for the chksum */
if (bch_keylist_realloc(&op->insert_keys,
3 + (op->csum ? 1 : 0),
- op->c)) {
+ op->c))
continue_at(cl, bch_data_insert_keys, op->wq);
- return;
- }
k = op->insert_keys.top;
bkey_init(k);
@@ -258,7 +254,6 @@ static void bch_data_insert_start(struct closure *cl)
op->insert_data_done = true;
continue_at(cl, bch_data_insert_keys, op->wq);
- return;
err:
/* bch_alloc_sectors() blocks if s->writeback = true */
BUG_ON(op->writeback);
@@ -584,10 +579,8 @@ static void cache_lookup(struct closure *cl)
ret = bch_btree_map_keys(&s->op, s->iop.c,
&KEY(s->iop.inode, bio->bi_iter.bi_sector, 0),
cache_lookup_fn, MAP_END_KEY);
- if (ret == -EAGAIN) {
+ if (ret == -EAGAIN)
continue_at(cl, cache_lookup, bcache_wq);
- return;
- }
/*
* We might meet err when searching the btree, If that happens, we will
@@ -988,8 +981,7 @@ static void cached_dev_nodata(struct closure *cl)
/* Cached devices - read & write stuff */
-static blk_qc_t cached_dev_make_request(struct request_queue *q,
- struct bio *bio)
+static void __cached_dev_make_request(struct request_queue *q, struct bio *bio)
{
struct search *s;
struct bcache_device *d = bio->bi_disk->private_data;
@@ -1028,7 +1020,12 @@ static blk_qc_t cached_dev_make_request(struct request_queue *q,
else
generic_make_request(bio);
}
+}
+static blk_qc_t cached_dev_make_request(struct request_queue *q,
+ struct bio *bio)
+{
+ __cached_dev_make_request(q, bio);
return BLK_QC_T_NONE;
}
@@ -1103,8 +1100,7 @@ static void flash_dev_nodata(struct closure *cl)
continue_at(cl, search_free, NULL);
}
-static blk_qc_t flash_dev_make_request(struct request_queue *q,
- struct bio *bio)
+static void __flash_dev_make_request(struct request_queue *q, struct bio *bio)
{
struct search *s;
struct closure *cl;
@@ -1127,7 +1123,6 @@ static blk_qc_t flash_dev_make_request(struct request_queue *q,
continue_at_nobarrier(&s->cl,
flash_dev_nodata,
bcache_wq);
- return BLK_QC_T_NONE;
} else if (rw) {
bch_keybuf_check_overlapping(&s->iop.c->moving_gc_keys,
&KEY(d->id, bio->bi_iter.bi_sector, 0),
@@ -1143,6 +1138,11 @@ static blk_qc_t flash_dev_make_request(struct request_queue *q,
}
continue_at(cl, search_free, NULL);
+}
+
+static blk_qc_t flash_dev_make_request(struct request_queue *q, struct bio *bio)
+{
+ __flash_dev_make_request(q, bio);
return BLK_QC_T_NONE;
}