filemap: remove page_endio()

Message ID 20230510124716.73655-1-p.raghav@samsung.com
State New
Headers
Series filemap: remove page_endio() |

Commit Message

Pankaj Raghav May 10, 2023, 12:47 p.m. UTC
  page_endio() is not used anymore. Remove it.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
This is a leftover patch from [1]. As ZRAM page_endio usage has been
removed, this patch can be merged safely.
[1]https://lore.kernel.org/linux-fsdevel/20230411122920.30134-1-p.raghav@samsung.com/

 include/linux/pagemap.h |  2 --
 mm/filemap.c            | 30 ------------------------------
 2 files changed, 32 deletions(-)
  

Comments

Christoph Hellwig May 10, 2023, 1:28 p.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
  
Matthew Wilcox May 10, 2023, 1:36 p.m. UTC | #2
On Wed, May 10, 2023 at 02:47:16PM +0200, Pankaj Raghav wrote:
> page_endio() is not used anymore. Remove it.
> 
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>

Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
  

Patch

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index a56308a9d1a4..c1ae5ebc375f 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1078,8 +1078,6 @@  int filemap_migrate_folio(struct address_space *mapping, struct folio *dst,
 #else
 #define filemap_migrate_folio NULL
 #endif
-void page_endio(struct page *page, bool is_write, int err);
-
 void folio_end_private_2(struct folio *folio);
 void folio_wait_private_2(struct folio *folio);
 int folio_wait_private_2_killable(struct folio *folio);
diff --git a/mm/filemap.c b/mm/filemap.c
index 2d3d70c64dfd..570bc8c3db87 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1628,36 +1628,6 @@  void folio_end_writeback(struct folio *folio)
 }
 EXPORT_SYMBOL(folio_end_writeback);
 
-/*
- * After completing I/O on a page, call this routine to update the page
- * flags appropriately
- */
-void page_endio(struct page *page, bool is_write, int err)
-{
-	struct folio *folio = page_folio(page);
-
-	if (!is_write) {
-		if (!err) {
-			folio_mark_uptodate(folio);
-		} else {
-			folio_clear_uptodate(folio);
-			folio_set_error(folio);
-		}
-		folio_unlock(folio);
-	} else {
-		if (err) {
-			struct address_space *mapping;
-
-			folio_set_error(folio);
-			mapping = folio_mapping(folio);
-			if (mapping)
-				mapping_set_error(mapping, err);
-		}
-		folio_end_writeback(folio);
-	}
-}
-EXPORT_SYMBOL_GPL(page_endio);
-
 /**
  * __folio_lock - Get a lock on the folio, assuming we need to sleep to get it.
  * @folio: The folio to lock