memory-failure.c (36af67370e33db2ec48693dd20d6b3cd049e07af) | memory-failure.c (041711ce7cdf023f53d76f64d82b75210248e18d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2008, 2009 Intel Corporation 4 * Authors: Andi Kleen, Fengguang Wu 5 * 6 * High level machine check handler. Handles pages reported by the 7 * hardware as being corrupted usually due to a multi-bit ECC memory or cache 8 * failure. --- 1326 unchanged lines hidden (view full) --- 1335 try_to_unmap(hpage, ttu); 1336 } else { 1337 if (!PageAnon(hpage)) { 1338 /* 1339 * For hugetlb pages in shared mappings, try_to_unmap 1340 * could potentially call huge_pmd_unshare. Because of 1341 * this, take semaphore in write mode here and set 1342 * TTU_RMAP_LOCKED to indicate we have taken the lock | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2008, 2009 Intel Corporation 4 * Authors: Andi Kleen, Fengguang Wu 5 * 6 * High level machine check handler. Handles pages reported by the 7 * hardware as being corrupted usually due to a multi-bit ECC memory or cache 8 * failure. --- 1326 unchanged lines hidden (view full) --- 1335 try_to_unmap(hpage, ttu); 1336 } else { 1337 if (!PageAnon(hpage)) { 1338 /* 1339 * For hugetlb pages in shared mappings, try_to_unmap 1340 * could potentially call huge_pmd_unshare. Because of 1341 * this, take semaphore in write mode here and set 1342 * TTU_RMAP_LOCKED to indicate we have taken the lock |
1343 * at this higer level. | 1343 * at this higher level. |
1344 */ 1345 mapping = hugetlb_page_mapping_lock_write(hpage); 1346 if (mapping) { 1347 try_to_unmap(hpage, ttu|TTU_RMAP_LOCKED); 1348 i_mmap_unlock_write(mapping); 1349 } else 1350 pr_info("Memory failure: %#lx: could not lock mapping for mapped huge page\n", pfn); 1351 } else { --- 860 unchanged lines hidden --- | 1344 */ 1345 mapping = hugetlb_page_mapping_lock_write(hpage); 1346 if (mapping) { 1347 try_to_unmap(hpage, ttu|TTU_RMAP_LOCKED); 1348 i_mmap_unlock_write(mapping); 1349 } else 1350 pr_info("Memory failure: %#lx: could not lock mapping for mapped huge page\n", pfn); 1351 } else { --- 860 unchanged lines hidden --- |