Hibernate: Replace unnecessary evaluation of pfn_to_page()
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 7 Dec 2008 23:52:49 +0000 (00:52 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 19 Dec 2008 09:40:35 +0000 (04:40 -0500)
Replace one evaluation of pfn_to_page() in copy_data_pages() with
the value of a local variable containing the right number already.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
kernel/power/snapshot.c

index ec9f153..f5fc2d7 100644 (file)
@@ -981,7 +981,7 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
                         * data modified by kmap_atomic()
                         */
                        safe_copy_page(buffer, s_page);
-                       dst = kmap_atomic(pfn_to_page(dst_pfn), KM_USER0);
+                       dst = kmap_atomic(d_page, KM_USER0);
                        memcpy(dst, buffer, PAGE_SIZE);
                        kunmap_atomic(dst, KM_USER0);
                } else {