diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-24 11:02:34 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-24 18:17:20 -0700 |
commit | 309dca309fc39a9e3c31b916393b74bd174fd74e (patch) | |
tree | 2d4687a800a52cfd96482c7c01224236da796102 /mm/page_io.c | |
parent | cf9a978f9781fb30b778ee61ef6bd164c655d9ff (diff) | |
download | linux-stable-309dca309fc39a9e3c31b916393b74bd174fd74e.tar.gz linux-stable-309dca309fc39a9e3c31b916393b74bd174fd74e.tar.bz2 linux-stable-309dca309fc39a9e3c31b916393b74bd174fd74e.zip |
block: store a block_device pointer in struct bio
Replace the gendisk pointer in struct bio with a pointer to the newly
improved struct block device. From that the gendisk can be trivially
accessed with an extra indirection, but it also allows to directly
look up all information related to partition remapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r-- | mm/page_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c index 9bca17ecc4df..a75f35464a4e 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -433,7 +433,7 @@ int swap_readpage(struct page *page, bool synchronous) ret = -ENOMEM; goto out; } - disk = bio->bi_disk; + disk = bio->bi_bdev->bd_disk; /* * Keep this task valid during swap readpage because the oom killer may * attempt to access it in the page fault retry time check. |