fs/buffer: Convert __block_write_begin_int() to take a folio

There are no plans to convert buffer_head infrastructure to use large
folios, but __block_write_begin_int() is called from iomap, and it's
more convenient and less error-prone if we pass in a folio from iomap.
It also has a nice saving of almost 200 bytes of code from removing
repeated calls to compound_head().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle)
2021-11-03 14:05:47 -04:00
parent 640d1930be
commit d1bd0b4ebf
3 changed files with 18 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ static inline int emergency_thaw_bdev(struct super_block *sb)
/*
* buffer.c
*/
int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
int __block_write_begin_int(struct folio *folio, loff_t pos, unsigned len,
get_block_t *get_block, const struct iomap *iomap);
/*