diff options
author | Christoph Hellwig | 2021-10-18 12:11:10 +0200 |
---|---|---|
committer | Jens Axboe | 2021-10-18 14:43:22 -0600 |
commit | bcd1d06350e410f60518f9d778d9cc4674f57158 (patch) | |
tree | 7836fd555c77fb96de2b4a6f5b9b5d5797ab0228 /fs/buffer.c | |
parent | b86058f96cc86e415e51bd12cc3786d7cdbd8b47 (diff) |
fs: simplify init_page_buffers
No need to convert from bdev to inode and back.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211018101130.1838532-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 156358977249..46bc589b7a03 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -897,7 +897,7 @@ init_page_buffers(struct page *page, struct block_device *bdev, struct buffer_head *head = page_buffers(page); struct buffer_head *bh = head; int uptodate = PageUptodate(page); - sector_t end_block = blkdev_max_block(I_BDEV(bdev->bd_inode), size); + sector_t end_block = blkdev_max_block(bdev, size); do { if (!buffer_mapped(bh)) { |