diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-28 08:13:52 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-28 08:13:52 +0100 |
commit | fdddcfd9c93c6db006004fa5ba7fd9380e721c3f (patch) | |
tree | 4d029f3bd29be07eac87bcfad3bd7e3012fb9428 /mm/memory-failure.c | |
parent | f9f7bb9e0a0ca33f65a3deae9ec5e07266908fc5 (diff) | |
parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) | |
download | linux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.tar.gz linux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.tar.bz2 linux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.zip |
Merge 5.0-rc4 into char-misc-next
We need the char-misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 6379fff1a5ff..7c72f2a95785 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -966,7 +966,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, enum ttu_flags ttu = TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS; struct address_space *mapping; LIST_HEAD(tokill); - bool unmap_success = true; + bool unmap_success; int kill = 1, forcekill; struct page *hpage = *hpagep; bool mlocked = PageMlocked(hpage); @@ -1028,19 +1028,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, if (kill) collect_procs(hpage, &tokill, flags & MF_ACTION_REQUIRED); - if (!PageHuge(hpage)) { - unmap_success = try_to_unmap(hpage, ttu); - } else if (mapping) { - /* - * For hugetlb pages, try_to_unmap could potentially call - * huge_pmd_unshare. Because of this, take semaphore in - * write mode here and set TTU_RMAP_LOCKED to indicate we - * have taken the lock at this higer level. - */ - i_mmap_lock_write(mapping); - unmap_success = try_to_unmap(hpage, ttu|TTU_RMAP_LOCKED); - i_mmap_unlock_write(mapping); - } + unmap_success = try_to_unmap(hpage, ttu); if (!unmap_success) pr_err("Memory failure: %#lx: failed to unmap page (mapcount=%d)\n", pfn, page_mapcount(hpage)); |