Skip to content

Commit 3f59493

Browse files
Kefeng Wangakpm00
authored andcommitted
mm: migrate: remove folio_migrate_copy()
The folio_migrate_copy() is just a wrapper of folio_copy() and folio_migrate_flags(), it is simple and only aio use it for now, unfold it and remove folio_migrate_copy(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kefeng Wang <[email protected]> Reviewed-by: Jane Chu <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Benjamin LaHaise <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Jiaqi Yan <[email protected]> Cc: Lance Yang <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Miaohe Lin <[email protected]> Cc: Muchun Song <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vishal Moola (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent f00b295 commit 3f59493

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

fs/aio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ static int aio_migrate_folio(struct address_space *mapping, struct folio *dst,
455455
* events from being lost.
456456
*/
457457
spin_lock_irqsave(&ctx->completion_lock, flags);
458-
folio_migrate_copy(dst, src);
458+
folio_copy(dst, src);
459+
folio_migrate_flags(dst, src);
459460
BUG_ON(ctx->ring_folios[idx] != src);
460461
ctx->ring_folios[idx] = dst;
461462
spin_unlock_irqrestore(&ctx->completion_lock, flags);

include/linux/migrate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ int migrate_huge_page_move_mapping(struct address_space *mapping,
7676
void migration_entry_wait_on_locked(swp_entry_t entry, spinlock_t *ptl)
7777
__releases(ptl);
7878
void folio_migrate_flags(struct folio *newfolio, struct folio *folio);
79-
void folio_migrate_copy(struct folio *newfolio, struct folio *folio);
8079
int folio_migrate_mapping(struct address_space *mapping,
8180
struct folio *newfolio, struct folio *folio, int extra_count);
8281

mm/migrate.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -672,13 +672,6 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
672672
}
673673
EXPORT_SYMBOL(folio_migrate_flags);
674674

675-
void folio_migrate_copy(struct folio *newfolio, struct folio *folio)
676-
{
677-
folio_copy(newfolio, folio);
678-
folio_migrate_flags(newfolio, folio);
679-
}
680-
EXPORT_SYMBOL(folio_migrate_copy);
681-
682675
/************************************************************
683676
* Migration functions
684677
***********************************************************/

0 commit comments

Comments
 (0)