]> www.infradead.org Git - users/hch/block.git/commitdiff
bcache: use bdev_read_cache_page
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Oct 2021 08:02:32 +0000 (10:02 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 12 Oct 2021 08:29:36 +0000 (10:29 +0200)
Use bdev_read_cache_page instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/md/bcache/super.c

index 4f89985abe4b7571332f7b417ce7b267cd4b25e7..d0905bac58c3c5a0cfc564be34b60403e1cea4f6 100644 (file)
@@ -172,8 +172,7 @@ static const char *read_super(struct cache_sb *sb, struct block_device *bdev,
        struct page *page;
        unsigned int i;
 
-       page = read_cache_page_gfp(bdev->bd_inode->i_mapping,
-                                  SB_OFFSET >> PAGE_SHIFT, GFP_KERNEL);
+       page = bdev_read_cache_page(bdev, SB_OFFSET >> PAGE_SHIFT, GFP_KERNEL);
        if (IS_ERR(page))
                return "IO error";
        s = page_address(page) + offset_in_page(SB_OFFSET);