]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fs: Remove aops->migratepage()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 6 Jun 2022 15:53:31 +0000 (11:53 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 2 Aug 2022 16:34:04 +0000 (12:34 -0400)
With all users converted to migrate_folio(), remove this operation.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/linux/fs.h
mm/compaction.c
mm/migrate.c

index 9e6b17da4e11b17f74c4e54f5f410e5489652bc4..7e06919b8f6030d0338ae192ffda72aabae9839c 100644 (file)
@@ -367,8 +367,6 @@ struct address_space_operations {
         */
        int (*migrate_folio)(struct address_space *, struct folio *dst,
                        struct folio *src, enum migrate_mode);
-       int (*migratepage) (struct address_space *,
-                       struct page *, struct page *, enum migrate_mode);
        int (*launder_folio)(struct folio *);
        bool (*is_partially_uptodate) (struct folio *, size_t from,
                        size_t count);
index 458f49f9ab09b52b1a17191ae7006df1caf00d91..a2c53fcf933e6f4ffd4f99a3589ce67d34b9812a 100644 (file)
@@ -1031,7 +1031,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
 
                        /*
                         * Only pages without mappings or that have a
-                        * ->migratepage callback are possible to migrate
+                        * ->migrate_folio callback are possible to migrate
                         * without blocking. However, we can be racing with
                         * truncation so it's necessary to lock the page
                         * to stabilise the mapping as truncation holds
@@ -1043,8 +1043,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
 
                        mapping = page_mapping(page);
                        migrate_dirty = !mapping ||
-                                       mapping->a_ops->migrate_folio ||
-                                       mapping->a_ops->migratepage;
+                                       mapping->a_ops->migrate_folio;
                        unlock_page(page);
                        if (!migrate_dirty)
                                goto isolate_fail_put;
index 0dd3ec9525b35411e5d969283e7d75e8e248c021..1b4b977809a1c0aa61ba75c43ccbee2d96defafd 100644 (file)
@@ -909,9 +909,6 @@ static int move_to_new_folio(struct folio *dst, struct folio *src,
                         */
                        rc = mapping->a_ops->migrate_folio(mapping, dst, src,
                                                                mode);
-               else if (mapping->a_ops->migratepage)
-                       rc = mapping->a_ops->migratepage(mapping, &dst->page,
-                                                       &src->page, mode);
                else
                        rc = fallback_migrate_folio(mapping, dst, src, mode);
        } else {