diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-07-10 15:45:32 -0400 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-08-07 11:32:02 +0200 |
| commit | a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b (patch) | |
| tree | 082609910e16ec2ff5e1b3c08d34b26240e7fcd6 /fs/ntfs3 | |
| parent | 3e5d37c5f98a06ee68a5c3e2784d4a4420e9d227 (diff) | |
| download | linux-a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b.tar.gz linux-a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b.tar.bz2 linux-a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b.zip | |
fs: Convert aops->write_end to take a folio
Most callers have a folio, and most implementations operate on a folio,
so remove the conversion from folio->page->folio to fit through this
interface.
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/ntfs3')
| -rw-r--r-- | fs/ntfs3/file.c | 2 | ||||
| -rw-r--r-- | fs/ntfs3/inode.c | 5 | ||||
| -rw-r--r-- | fs/ntfs3/ntfs_fs.h | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index ca1ddc46bd86..88a7d81cf2ba 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -215,7 +215,7 @@ static int ntfs_extend_initialized_size(struct file *file, zero_user_segment(page, zerofrom, PAGE_SIZE); /* This function in any case puts page. */ - err = ntfs_write_end(file, mapping, pos, len, len, page, NULL); + err = ntfs_write_end(file, mapping, pos, len, len, page_folio(page), NULL); if (err < 0) goto out; pos += len; diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 8eaaf9e465d4..9efd3f7c59d6 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -947,9 +947,8 @@ out: * ntfs_write_end - Address_space_operations::write_end. */ int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos, - u32 len, u32 copied, struct page *page, void *fsdata) + u32 len, u32 copied, struct folio *folio, void *fsdata) { - struct folio *folio = page_folio(page); struct inode *inode = mapping->host; struct ntfs_inode *ni = ntfs_i(inode); u64 valid = ni->i_valid; @@ -979,7 +978,7 @@ int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos, folio_unlock(folio); folio_put(folio); } else { - err = generic_write_end(file, mapping, pos, len, copied, page, + err = generic_write_end(file, mapping, pos, len, copied, folio, fsdata); } diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index 4e363b8342d6..53517281f26b 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -713,7 +713,7 @@ int ntfs_get_block(struct inode *inode, sector_t vbn, int ntfs_write_begin(struct file *file, struct address_space *mapping, loff_t pos, u32 len, struct page **pagep, void **fsdata); int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos, - u32 len, u32 copied, struct page *page, void *fsdata); + u32 len, u32 copied, struct folio *folio, void *fsdata); int ntfs3_write_inode(struct inode *inode, struct writeback_control *wbc); int ntfs_sync_inode(struct inode *inode); int ntfs_flush_inodes(struct super_block *sb, struct inode *i1, |
