diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-07-15 14:24:01 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-07 11:33:21 +0200 |
commit | 1da86618bdce301d23e89ecce92161f9d3b3c5e7 (patch) | |
tree | 7e6d452f81d12f8b472b0a037f0d5654ea18766b /mm/filemap.c | |
parent | a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b (diff) |
fs: Convert aops->write_begin to take a folio
Convert all callers from working on a page to working on one page
of a folio (support for working on an entire folio can come later).
Removes a lot of folio->page->folio conversions.
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 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index fab6b0c3044e..29fec1fccd0a 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3987,7 +3987,6 @@ ssize_t generic_perform_write(struct kiocb *iocb, struct iov_iter *i) ssize_t written = 0; do { - struct page *page; struct folio *folio; size_t offset; /* Offset into folio */ size_t bytes; /* Bytes to write to folio */ @@ -4017,11 +4016,10 @@ retry: } status = a_ops->write_begin(file, mapping, pos, bytes, - &page, &fsdata); + &folio, &fsdata); if (unlikely(status < 0)) break; - folio = page_folio(page); offset = offset_in_folio(folio, pos); if (bytes > folio_size(folio) - offset) bytes = folio_size(folio) - offset; |