diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-07-10 14:51:11 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-07 11:31:59 +0200 |
commit | 97edbc02b2efdb0cd0f507b6a45fc509acc861bb (patch) | |
tree | 5922b2c855c5b53e8dcb5cf63ff961d9097277ab /fs/buffer.c | |
parent | c4c9c89c8c8ec1bcb0fad951b91da0d3a7569a71 (diff) |
buffer: Convert block_write_end() to take a folio
All callers now have a folio, so pass it in instead of converting
from a folio to a page and back to a folio again. Saves a call
to compound_head().
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 448338810802..acba3dfe55d8 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2247,9 +2247,8 @@ EXPORT_SYMBOL(block_write_begin); int block_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, - struct page *page, void *fsdata) + struct folio *folio, void *fsdata) { - struct folio *folio = page_folio(page); size_t start = pos - folio_pos(folio); if (unlikely(copied < len)) { @@ -2288,7 +2287,7 @@ int generic_write_end(struct file *file, struct address_space *mapping, loff_t old_size = inode->i_size; bool i_size_changed = false; - copied = block_write_end(file, mapping, pos, len, copied, page, fsdata); + copied = block_write_end(file, mapping, pos, len, copied, folio, fsdata); /* * No need to use i_size_read() here, the i_size cannot change under us |