]> www.infradead.org Git - users/hch/misc.git/commitdiff
mm: remove write_cache_pages write_cache_pages-removal
authorChristoph Hellwig <hch@lst.de>
Thu, 14 Aug 2025 04:26:38 +0000 (06:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 14 Aug 2025 04:26:38 +0000 (06:26 +0200)
No users left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/writeback.h
mm/page-writeback.c

index a2848d731a466387dabc3e1fe7e6998cf083b7cf..2a7e134d03ee43a63898720ea5d91ab9fb9b1f9a 100644 (file)
@@ -360,12 +360,6 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb);
 struct folio *writeback_iter(struct address_space *mapping,
                struct writeback_control *wbc, struct folio *folio, int *error);
 
-typedef int (*writepage_t)(struct folio *folio, struct writeback_control *wbc,
-                               void *data);
-
-int write_cache_pages(struct address_space *mapping,
-                     struct writeback_control *wbc, writepage_t writepage,
-                     void *data);
 int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
 void writeback_set_ratelimit(void);
 void tag_pages_for_writeback(struct address_space *mapping,
index 3e248d1c3969be82fb2f460f840ce47124d21645..7e1e798e72133c8a53fda9ba06f191793b333ff4 100644 (file)
@@ -2590,36 +2590,6 @@ done:
 }
 EXPORT_SYMBOL_GPL(writeback_iter);
 
-/**
- * write_cache_pages - walk the list of dirty pages of the given address space and write all of them.
- * @mapping: address space structure to write
- * @wbc: subtract the number of written pages from *@wbc->nr_to_write
- * @writepage: function called for each page
- * @data: data passed to writepage function
- *
- * Return: %0 on success, negative error code otherwise
- *
- * Note: please use writeback_iter() instead.
- */
-int write_cache_pages(struct address_space *mapping,
-                     struct writeback_control *wbc, writepage_t writepage,
-                     void *data)
-{
-       struct folio *folio = NULL;
-       int error;
-
-       while ((folio = writeback_iter(mapping, wbc, folio, &error))) {
-               error = writepage(folio, wbc, data);
-               if (error == AOP_WRITEPAGE_ACTIVATE) {
-                       folio_unlock(folio);
-                       error = 0;
-               }
-       }
-
-       return error;
-}
-EXPORT_SYMBOL(write_cache_pages);
-
 int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
 {
        int ret;