diff options
author | 2024-08-07 11:35:08 +0200 | |
---|---|---|
committer | 2024-08-07 11:35:08 +0200 | |
commit | 3e673d651c3749e7447f0ccccfebb9cea58d8bf2 (patch) | |
tree | 3d957d78bfce2c9041c04fab37b0579dcce5e61b /mm/filemap.c | |
parent | Linux 6.11-rc1 (diff) | |
parent | buffer: Convert __block_write_begin() to take a folio (diff) | |
download | linux-rng-3e673d651c3749e7447f0ccccfebb9cea58d8bf2.tar.xz linux-rng-3e673d651c3749e7447f0ccccfebb9cea58d8bf2.zip |
Merge branch 'work.write.end'
Matthew Wilcox (Oracle) <willy@infradead.org> says:
On top of the ufs, minix, sysv and qnx6 directory handling patches, this
patch series converts us to using folios for write_begin and write_end.
That's the last mention of 'struct page' in several filesystems.
* work.write.end: (54 commits)
buffer: Convert __block_write_begin() to take a folio
ocfs2: Convert ocfs2_write_zero_page to use a folio
fs: Convert aops->write_begin to take a folio
fs: Convert aops->write_end to take a folio
vboxsf: Use a folio in vboxsf_write_end()
orangefs: Convert orangefs_write_begin() to use a folio
orangefs: Convert orangefs_write_end() to use a folio
jffs2: Convert jffs2_write_begin() to use a folio
jffs2: Convert jffs2_write_end() to use a folio
hostfs: Convert hostfs_write_end() to use a folio
fuse: Convert fuse_write_begin() to use a folio
fuse: Convert fuse_write_end() to use a folio
f2fs: Convert f2fs_write_begin() to use a folio
f2fs: Convert f2fs_write_end() to use a folio
ecryptfs: Use a folio in ecryptfs_write_begin()
ecryptfs: Convert ecryptfs_write_end() to use a folio
buffer: Convert block_write_end() to take a folio
ntfs3: Remove reset_log_file()
nilfs2: Use a folio in nilfs_recover_dsync_blocks()
buffer: Use a folio in generic_write_end()
...
Link: https://lore.kernel.org/r/20240717154716.237943-1-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d62150418b91..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; @@ -4033,7 +4031,7 @@ retry: flush_dcache_folio(folio); status = a_ops->write_end(file, mapping, pos, bytes, copied, - page, fsdata); + folio, fsdata); if (unlikely(status != copied)) { iov_iter_revert(i, copied - max(status, 0L)); if (unlikely(status < 0)) |