mm: migrate: remove unused mode argument
Subsystems (6)
PATCH 1/1 mm: migrate: remove unused mode argument
migrate_page_move_mapping() doesn't use the mode argument. Remove it and update callers accordingly.
Signed-off-by Keith Busch <[email protected]>
--- fs/aio.c | 2 +- fs/f2fs/data.c | 2 +- fs/iomap.c | 2 +- fs/ubifs/file.c | 2 +- include/linux/migrate.h | 3 +-- mm/migrate.c | 7 +++---- 6 files changed, 8 insertions(+), 10 deletions(-)
fs/aio.c +1 -1
@@ -425,7 +425,7 @@ static int aio_migratepage(struct address_space *mapping, struct page *new,BUG_ON (PageWriteback (old));get_page (new); - rc =migrate_page_move_mapping (mapping, new, old, mode,1 ); + rc =migrate_page_move_mapping (mapping, new, old,1 );if (rc !=MIGRATEPAGE_SUCCESS ) {put_page (new); goto out_unlock;
fs/f2fs/data.c +1 -1
@@ -2801,7 +2801,7 @@ int f2fs_migrate_page(struct address_space *mapping,/* one extra reference was held for atomic_write page */ extra_count = atomic_written ?1 :0 ; rc =migrate_page_move_mapping (mapping, newpage, - page, mode, extra_count); + page, extra_count);if (rc !=MIGRATEPAGE_SUCCESS ) {if (atomic_written)mutex_unlock (&fi->inmem_lock);
fs/iomap.c +1 -1
@@ -571,7 +571,7 @@ iomap_migrate_page(struct address_space *mapping, struct page *newpage, {int ret; - ret =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + ret =migrate_page_move_mapping (mapping, newpage, page,0 );if (ret !=MIGRATEPAGE_SUCCESS )return ret;
fs/ubifs/file.c +1 -1
@@ -1481,7 +1481,7 @@ static int ubifs_migrate_page(struct address_space *mapping, {int rc; - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS )return rc;
include/linux/migrate.h +1 -2
@@ -77,8 +77,7 @@ extern void migrate_page_copy(struct page *newpage, struct page *page);extern int migrate_huge_page_move_mapping (struct address_space *mapping,struct page *newpage,struct page *page);extern int migrate_page_move_mapping (struct address_space *mapping, -struct page *newpage,struct page *page,enum migrate_mode mode, -int extra_count); +struct page *newpage,struct page *page,int extra_count);#else static inline void putback_movable_pages (struct list_head *l) {}
mm/migrate.c +3 -4
@@ -397,8 +397,7 @@ static int expected_page_refs(struct address_space *mapping, struct page *page)* 3 for pages with a mapping and PagePrivate/PagePrivate2 set. */ int migrate_page_move_mapping (struct address_space *mapping, -struct page *newpage,struct page *page,enum migrate_mode mode, -int extra_count) +struct page *newpage,struct page *page,int extra_count) {XA_STATE (xas, &mapping->i_pages,page_index (page));struct zone *oldzone, *newzone;
@@ -684,7 +683,7 @@ int migrate_page(struct address_space *mapping,BUG_ON (PageWriteback (page));/* Writeback must be complete */ - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS )return rc;
@@ -783,7 +782,7 @@ static int __buffer_migrate_page(struct address_space *mapping, } } - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS ) goto unlock_buffers;
Signature · 1 line
2.14.4
Zi Yan
reviewerQuoted 113 lines · Keith Busch
migrate_page_move_mapping()doesn't use the mode argument. Remove it and update callers accordingly.Signed-off-by Keith Busch <[email protected]>--- fs/aio.c | 2 +- fs/f2fs/data.c | 2 +- fs/iomap.c | 2 +- fs/ubifs/file.c | 2 +- include/linux/migrate.h | 3 +-- mm/migrate.c | 7 +++---- 6 files changed, 8 insertions(+), 10 deletions(-)fs/aio.c +1
-1@@ -425,7 +425,7 @@ static int aio_migratepage(struct address_space *mapping, struct page *new,BUG_ON (PageWriteback (old));get_page (new); - rc =migrate_page_move_mapping (mapping, new, old, mode,1 ); + rc =migrate_page_move_mapping (mapping, new, old,1 );if (rc !=MIGRATEPAGE_SUCCESS ) {put_page (new); goto out_unlock;fs/f2fs/data.c +1
-1@@ -2801,7 +2801,7 @@ int f2fs_migrate_page(struct address_space *mapping,/* one extra reference was held for atomic_write page */ extra_count = atomic_written ?1 :0 ; rc =migrate_page_move_mapping (mapping, newpage, - page, mode, extra_count); + page, extra_count);if (rc !=MIGRATEPAGE_SUCCESS ) {if (atomic_written)mutex_unlock (&fi->inmem_lock);fs/iomap.c +1
-1@@ -571,7 +571,7 @@ iomap_migrate_page(struct address_space *mapping, struct page *newpage, {int ret; - ret =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + ret =migrate_page_move_mapping (mapping, newpage, page,0 );if (ret !=MIGRATEPAGE_SUCCESS )return ret;fs/ubifs/file.c +1
-1@@ -1481,7 +1481,7 @@ static int ubifs_migrate_page(struct address_space *mapping, {int rc; - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS )return rc;include/linux/migrate.h +1
-2@@ -77,8 +77,7 @@ extern void migrate_page_copy(struct page *newpage, struct page *page);extern int migrate_huge_page_move_mapping (struct address_space *mapping,struct page *newpage,struct page *page);extern int migrate_page_move_mapping (struct address_space *mapping, -struct page *newpage,struct page *page,enum migrate_mode mode, -int extra_count); +struct page *newpage,struct page *page,int extra_count);#else static inline void putback_movable_pages (struct list_head *l) {}mm/migrate.c +3
-4@@ -397,8 +397,7 @@ static int expected_page_refs(struct address_space *mapping, struct page *page)* 3 for pages with a mapping and PagePrivate/PagePrivate2 set. */ int migrate_page_move_mapping (struct address_space *mapping, -struct page *newpage,struct page *page,enum migrate_mode mode, -int extra_count) +struct page *newpage,struct page *page,int extra_count) {XA_STATE (xas, &mapping->i_pages,page_index (page));struct zone *oldzone, *newzone;@@ -684,7 +683,7 @@ int migrate_page(struct address_space *mapping,BUG_ON (PageWriteback (page));/* Writeback must be complete */ - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS )return rc;@@ -783,7 +782,7 @@ static int __buffer_migrate_page(struct address_space *mapping, } } - rc =migrate_page_move_mapping (mapping, newpage, page, mode,0 ); + rc =migrate_page_move_mapping (mapping, newpage, page,0 );if (rc !=MIGRATEPAGE_SUCCESS ) goto unlock_buffers;Signature · 1 line
2.14.4
LGTM. Thanks. Reviewed-by: Zi Yan <[email protected]>
--
Best Regards,
Yan Zi