projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b86058f
)
fs: simplify init_page_buffers
author
Christoph Hellwig
<hch@lst.de>
Mon, 18 Oct 2021 10:11:10 +0000
(12:11 +0200)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 18 Oct 2021 20:43:22 +0000
(14:43 -0600)
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>
fs/buffer.c
patch
|
blob
|
history
diff --git
a/fs/buffer.c
b/fs/buffer.c
index
1563589
..
46bc589
100644
(file)
--- 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)) {