Skip to content

Commit

Permalink
mm/memory_hotplug.c: use pfn_to_nid() instead of page_to_nid(pfn_to_p…
Browse files Browse the repository at this point in the history
…age())

Use "pfn_to_nid(pfn)" instead of "page_to_nid(pfn_to_page(pfn))".

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Xishi Qiu authored and Linus Torvalds committed Nov 13, 2013
1 parent d6de9d5 commit 9c2606b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
arg.nr_pages = nr_pages;
node_states_check_changes_online(nr_pages, zone, &arg);

nid = page_to_nid(pfn_to_page(pfn));
nid = pfn_to_nid(pfn);

ret = memory_notify(MEM_GOING_ONLINE, &arg);
ret = notifier_to_errno(ret);
Expand Down

0 comments on commit 9c2606b

Please sign in to comment.