mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
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>
This commit is contained in:
parent
b86058f96c
commit
bcd1d06350
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user