summaryrefslogtreecommitdiff
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-15 14:24:01 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:33:21 +0200
commit1da86618bdce301d23e89ecce92161f9d3b3c5e7 (patch)
tree7e6d452f81d12f8b472b0a037f0d5654ea18766b /fs/ecryptfs
parenta225800f322a3d6cc8b8b6c7dc4d5281f2f5375b (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 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/mmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index f43e42ede75e..287e5d407f08 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -255,7 +255,7 @@ out:
* @mapping: The eCryptfs object
* @pos: The file offset at which to start writing
* @len: Length of the write
- * @pagep: Pointer to return the page
+ * @foliop: Pointer to return the folio
* @fsdata: Pointer to return fs data (unused)
*
* This function must zero any hole we create
@@ -265,7 +265,7 @@ out:
static int ecryptfs_write_begin(struct file *file,
struct address_space *mapping,
loff_t pos, unsigned len,
- struct page **pagep, void **fsdata)
+ struct folio **foliop, void **fsdata)
{
pgoff_t index = pos >> PAGE_SHIFT;
struct folio *folio;
@@ -276,7 +276,7 @@ static int ecryptfs_write_begin(struct file *file,
mapping_gfp_mask(mapping));
if (IS_ERR(folio))
return PTR_ERR(folio);
- *pagep = &folio->page;
+ *foliop = folio;
prev_page_end_size = ((loff_t)index << PAGE_SHIFT);
if (!folio_test_uptodate(folio)) {
@@ -365,7 +365,6 @@ out:
if (unlikely(rc)) {
folio_unlock(folio);
folio_put(folio);
- *pagep = NULL;
}
return rc;
}