]> git.baikalelectronics.ru Git - kernel.git/commit
buffer: Rewrite nobh_truncate_page() to use folios
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Apr 2022 03:59:15 +0000 (23:59 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 8 May 2022 18:45:57 +0000 (14:45 -0400)
commitb90f8dc66dd800814d2675f0a600954776ec53e0
treee8524508b12038ee8c57452b4bcb4a15bb314a82
parentc2c2b54d6845182b1e011094023c7b33f625f7a3
buffer: Rewrite nobh_truncate_page() to use folios

 - Calculate iblock directly instead of using a while loop
 - Move has_buffers to the end to remove a backwards jump
 - Use __filemap_get_folio() instead of grab_cache_page(), which
   removes a spurious FGP_ACCESSED flag.
 - Eliminate length and pos variables
 - Use folio APIs where they exist

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/buffer.c