diff options
author | 2023-11-09 21:06:03 +0000 | |
---|---|---|
committer | 2023-12-29 11:58:22 -0800 | |
commit | 382497ada051a6fc79612aba5e30cdfa26364374 (patch) | |
tree | e56f1fb1dd8e4da19a956f00dcf586c7394030ca /mm/rmap.c | |
parent | buffer: return bool from grow_dev_folio() (diff) | |
download | wireguard-linux-382497ada051a6fc79612aba5e30cdfa26364374.tar.xz wireguard-linux-382497ada051a6fc79612aba5e30cdfa26364374.zip |
buffer: calculate block number inside folio_init_buffers()
The calculation of block from index doesn't work for devices with a block
size larger than PAGE_SIZE as we end up shifting by a negative number.
Instead, calculate the number of the first block from the folio's position
in the block device. We no longer need to pass sizebits to
grow_dev_folio().
Link: https://lkml.kernel.org/r/20231109210608.2252323-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
0 files changed, 0 insertions, 0 deletions