Commit fa399c3
buffer: fix more functions for block size > PAGE_SIZE
Both __block_write_full_folio() and block_read_full_folio() assumed that
block size <= PAGE_SIZE. Replace the shift with a divide, which is
probably cheaper than first calculating the shift. That lets us remove
block_size_bits() as these were the last callers.
Link: https://lkml.kernel.org/r/20231109210608.2252323-8-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Pankaj Raghav <p.raghav@samsung.com>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent b061940 commit fa399c3
1 file changed
+6
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1742 | 1742 | | |
1743 | 1743 | | |
1744 | 1744 | | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
1754 | | - | |
1755 | | - | |
1756 | | - | |
1757 | | - | |
1758 | 1745 | | |
1759 | 1746 | | |
1760 | 1747 | | |
| |||
1807 | 1794 | | |
1808 | 1795 | | |
1809 | 1796 | | |
1810 | | - | |
| 1797 | + | |
1811 | 1798 | | |
1812 | 1799 | | |
1813 | 1800 | | |
| |||
1826 | 1813 | | |
1827 | 1814 | | |
1828 | 1815 | | |
1829 | | - | |
1830 | 1816 | | |
1831 | | - | |
1832 | | - | |
| 1817 | + | |
| 1818 | + | |
1833 | 1819 | | |
1834 | 1820 | | |
1835 | 1821 | | |
| |||
2355 | 2341 | | |
2356 | 2342 | | |
2357 | 2343 | | |
2358 | | - | |
| 2344 | + | |
2359 | 2345 | | |
2360 | 2346 | | |
2361 | 2347 | | |
| |||
2369 | 2355 | | |
2370 | 2356 | | |
2371 | 2357 | | |
2372 | | - | |
2373 | 2358 | | |
2374 | | - | |
2375 | | - | |
| 2359 | + | |
| 2360 | + | |
2376 | 2361 | | |
2377 | 2362 | | |
2378 | 2363 | | |
| |||
0 commit comments