Skip to content

Commit

Permalink
bcache: remove unused parameter
Browse files Browse the repository at this point in the history
Parameter bio is no longer used, clean it.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Reviewed-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Yijing Wang authored and Jens Axboe committed Oct 16, 2017
1 parent b41c9b0 commit 2385010
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/md/bcache/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct kmem_cache *bch_search_cache;

static void bch_data_insert_start(struct closure *);

static unsigned cache_mode(struct cached_dev *dc, struct bio *bio)
static unsigned cache_mode(struct cached_dev *dc)
{
return BDEV_CACHE_MODE(&dc->sb);
}

static bool verify(struct cached_dev *dc, struct bio *bio)
static bool verify(struct cached_dev *dc)
{
return dc->verify;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ static struct hlist_head *iohash(struct cached_dev *dc, uint64_t k)
static bool check_should_bypass(struct cached_dev *dc, struct bio *bio)
{
struct cache_set *c = dc->disk.c;
unsigned mode = cache_mode(dc, bio);
unsigned mode = cache_mode(dc);
unsigned sectors, congested = bch_get_congested(c);
struct task_struct *task = current;
struct io *i;
Expand Down Expand Up @@ -747,7 +747,7 @@ static void cached_dev_read_done(struct closure *cl)
s->cache_miss = NULL;
}

if (verify(dc, &s->bio.bio) && s->recoverable && !s->read_dirty_data)
if (verify(dc) && s->recoverable && !s->read_dirty_data)
bch_data_verify(dc, s->orig_bio);

bio_complete(s);
Expand All @@ -772,7 +772,7 @@ static void cached_dev_read_done_bh(struct closure *cl)

if (s->iop.status)
continue_at_nobarrier(cl, cached_dev_read_error, bcache_wq);
else if (s->iop.bio || verify(dc, &s->bio.bio))
else if (s->iop.bio || verify(dc))
continue_at_nobarrier(cl, cached_dev_read_done, bcache_wq);
else
continue_at_nobarrier(cl, cached_dev_bio_complete, NULL);
Expand Down Expand Up @@ -899,7 +899,7 @@ static void cached_dev_write(struct cached_dev *dc, struct search *s)
s->iop.bypass = true;

if (should_writeback(dc, s->orig_bio,
cache_mode(dc, bio),
cache_mode(dc),
s->iop.bypass)) {
s->iop.bypass = false;
s->iop.writeback = true;
Expand Down

0 comments on commit 2385010

Please sign in to comment.