diff mbox series

[25/69] fs: Remove pagecache_write_begin() and pagecache_write_end()

Message ID 20220429172556.3011843-26-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Filesystem/page cache patches for 5.19 | expand

Commit Message

Matthew Wilcox April 29, 2022, 5:25 p.m. UTC
These wrappers have no more users; remove them.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/fs.h | 12 ------------
 mm/filemap.c       | 20 --------------------
 2 files changed, 32 deletions(-)

Comments

Christoph Hellwig May 3, 2022, 2:38 p.m. UTC | #1
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/include/linux/fs.h b/include/linux/fs.h
index a0e73432526f..b35ce086a7a1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -380,18 +380,6 @@  struct address_space_operations {
 
 extern const struct address_space_operations empty_aops;
 
-/*
- * pagecache_write_begin/pagecache_write_end must be used by general code
- * to write into the pagecache.
- */
-int pagecache_write_begin(struct file *, struct address_space *mapping,
-				loff_t pos, unsigned len, unsigned flags,
-				struct page **pagep, void **fsdata);
-
-int pagecache_write_end(struct file *, struct address_space *mapping,
-				loff_t pos, unsigned len, unsigned copied,
-				struct page *page, void *fsdata);
-
 /**
  * struct address_space - Contents of a cacheable, mappable object.
  * @host: Owner, either the inode or the block_device.
diff --git a/mm/filemap.c b/mm/filemap.c
index 0751843b052f..c15cfc28f9ce 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3622,26 +3622,6 @@  struct page *read_cache_page_gfp(struct address_space *mapping,
 }
 EXPORT_SYMBOL(read_cache_page_gfp);
 
-int pagecache_write_begin(struct file *file, struct address_space *mapping,
-				loff_t pos, unsigned len, unsigned flags,
-				struct page **pagep, void **fsdata)
-{
-	const struct address_space_operations *aops = mapping->a_ops;
-
-	return aops->write_begin(file, mapping, pos, len, pagep, fsdata);
-}
-EXPORT_SYMBOL(pagecache_write_begin);
-
-int pagecache_write_end(struct file *file, struct address_space *mapping,
-				loff_t pos, unsigned len, unsigned copied,
-				struct page *page, void *fsdata)
-{
-	const struct address_space_operations *aops = mapping->a_ops;
-
-	return aops->write_end(file, mapping, pos, len, copied, page, fsdata);
-}
-EXPORT_SYMBOL(pagecache_write_end);
-
 /*
  * Warn about a page cache invalidation failure during a direct I/O write.
  */