* [UPDATE PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code
[not found] <20200517214718.468-1-guoqing.jiang@cloud.ionos.com>
@ 2020-05-19 21:40 ` Guoqing Jiang
0 siblings, 0 replies; only message in thread
From: Guoqing Jiang @ 2020-05-19 21:40 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, david, hch, willy, Guoqing Jiang
We can cleanup code a little by call detach_page_private here.
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
---
Add the cast to fix type mismatch warning, sorry for the mistake.
mm/migrate.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 7160c1556f79..44546d407e40 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -797,10 +797,7 @@ static int __buffer_migrate_page(struct address_space *mapping,
if (rc != MIGRATEPAGE_SUCCESS)
goto unlock_buffers;
- ClearPagePrivate(page);
- set_page_private(newpage, page_private(page));
- set_page_private(page, 0);
- put_page(page);
+ set_page_private(newpage, (unsigned long)detach_page_private(page));
get_page(newpage);
bh = head;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-19 21:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200517214718.468-1-guoqing.jiang@cloud.ionos.com>
2020-05-19 21:40 ` [UPDATE PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code Guoqing Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).