OSDN Git Service

futex: Fix futex lock the wrong page
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / kernel / futex.c
index ec9df5b..15d850f 100644 (file)
@@ -593,8 +593,8 @@ again:
                 * applies. If this is really a shmem page then the page lock
                 * will prevent unexpected transitions.
                 */
-               lock_page(page);
-               shmem_swizzled = PageSwapCache(page) || page->mapping;
+               lock_page(page_head);
+               shmem_swizzled = PageSwapCache(page_head) || page_head->mapping;
                unlock_page(page_head);
                put_page(page_head);