lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 6 Jun 2022 21:40:45 +0100 From: "Matthew Wilcox (Oracle)" <willy@...radead.org> To: linux-fsdevel@...r.kernel.org Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>, linux-kernel@...r.kernel.org, linux-block@...r.kernel.org, linux-aio@...ck.org, linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, cluster-devel@...hat.com, linux-mm@...ck.org, linux-xfs@...r.kernel.org, linux-nfs@...r.kernel.org, linux-ntfs-dev@...ts.sourceforge.net, ocfs2-devel@....oracle.com, linux-mtd@...ts.infradead.org, virtualization@...ts.linux-foundation.org Subject: [PATCH 15/20] balloon: Convert to migrate_folio This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org> --- mm/balloon_compaction.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c index 4b8eab4b3f45..3f75b876ad76 100644 --- a/mm/balloon_compaction.c +++ b/mm/balloon_compaction.c @@ -230,11 +230,10 @@ static void balloon_page_putback(struct page *page) /* move_to_new_page() counterpart for a ballooned page */ -static int balloon_page_migrate(struct address_space *mapping, - struct page *newpage, struct page *page, - enum migrate_mode mode) +static int balloon_migrate_folio(struct address_space *mapping, + struct folio *dst, struct folio *src, enum migrate_mode mode) { - struct balloon_dev_info *balloon = balloon_page_device(page); + struct balloon_dev_info *balloon = balloon_page_device(&src->page); /* * We can not easily support the no copy case here so ignore it as it @@ -244,14 +243,14 @@ static int balloon_page_migrate(struct address_space *mapping, if (mode == MIGRATE_SYNC_NO_COPY) return -EINVAL; - VM_BUG_ON_PAGE(!PageLocked(page), page); - VM_BUG_ON_PAGE(!PageLocked(newpage), newpage); + VM_BUG_ON_FOLIO(!folio_test_locked(src), src); + VM_BUG_ON_FOLIO(!folio_test_locked(dst), dst); - return balloon->migratepage(balloon, newpage, page, mode); + return balloon->migratepage(balloon, &dst->page, &src->page, mode); } const struct address_space_operations balloon_aops = { - .migratepage = balloon_page_migrate, + .migrate_folio = balloon_migrate_folio, .isolate_page = balloon_page_isolate, .putback_page = balloon_page_putback, }; -- 2.35.1
Powered by blists - more mailing lists