diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-26 17:33:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-26 18:50:01 +0300 |
commit | f65b95fe0cedc1be2ec33a2892ee43fae0408719 (patch) | |
tree | 1ae6f249f641bab1516d0de9a6fb5896e0cd2760 /drivers | |
parent | a7c7f7b2b641bef52212fbe8be4a66ede043d3c7 (diff) | |
download | linux-f65b95fe0cedc1be2ec33a2892ee43fae0408719.tar.xz |
bcache: use bio_set_dev to assign ->bi_bdev
Always use the bio_set_dev helper to assign ->bi_bdev to make sure
other state related to the device is uptodate.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/bcache/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index 058dd8014428..63e809f38e3f 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -114,7 +114,7 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) check = bio_kmalloc(GFP_NOIO, bio_segments(bio)); if (!check) return; - check->bi_bdev = bio->bi_bdev; + bio_set_dev(check, bio->bi_bdev); check->bi_opf = REQ_OP_READ; check->bi_iter.bi_sector = bio->bi_iter.bi_sector; check->bi_iter.bi_size = bio->bi_iter.bi_size; |