aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuoqing Jiang <[email protected]>2020-06-01 21:48:06 -0700
committerLinus Torvalds <[email protected]>2020-06-02 10:59:08 -0700
commitcd0f37154443844256709f736754b1bace5b24d8 (patch)
tree7c83dea7b4c3cee97d0bb35dffba823b719e6e36
parent7b59435a2afed12dc9b2ec1b930efa2e94f1c397 (diff)
mm/migrate.c: call detach_page_private to cleanup code
We can cleanup code a little by call detach_page_private here. [[email protected]: use attach_page_private(), per Dave] http://lkml.kernel.org/r/[email protected] [[email protected]: clear PagePrivate] Signed-off-by: Guoqing Jiang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Chao Yu <[email protected]> Cc: Cong Wang <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Eric Biggers <[email protected]> Cc: Gao Xiang <[email protected]> Cc: Jaegeuk Kim <[email protected]> Cc: John Hubbard <[email protected]> Cc: Joseph Qi <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Zi Yan <[email protected]> Cc: Johannes Thumshirn <[email protected]> Cc: Miklos Szeredi <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/migrate.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index f66f93f9a5e2..fb425d86c115 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -797,10 +797,7 @@ recheck_buffers:
if (rc != MIGRATEPAGE_SUCCESS)
goto unlock_buffers;
- ClearPagePrivate(page);
- set_page_private(newpage, page_private(page));
- set_page_private(page, 0);
- put_page(page);
+ attach_page_private(newpage, detach_page_private(page));
get_page(newpage);
bh = head;
@@ -810,8 +807,6 @@ recheck_buffers:
} while (bh != head);
- SetPagePrivate(newpage);
-
if (mode != MIGRATE_SYNC_NO_COPY)
migrate_page_copy(newpage, page);
else