summaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2011-01-30 11:15:49 +0800
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-17 13:08:27 -0300
commitf58c9df78c0360f0eb3852b9cc3a61e689bc2dd1 (patch)
tree378a97ad8e857d73ae6762312c7bcb1cf5efd4bc /mm/memory-failure.c
parentfafc3dbaac6447ab8f78d2f7f32a521b24fc6b36 (diff)
downloadlinux-stable-f58c9df78c0360f0eb3852b9cc3a61e689bc2dd1.tar.gz
linux-stable-f58c9df78c0360f0eb3852b9cc3a61e689bc2dd1.tar.bz2
linux-stable-f58c9df78c0360f0eb3852b9cc3a61e689bc2dd1.zip
mm: remove is_hwpoison_address
Unused. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 0207c2f6f8bd..99ccb4472623 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1487,35 +1487,3 @@ done:
/* keep elevated page count for bad page */
return ret;
}
-
-/*
- * The caller must hold current->mm->mmap_sem in read mode.
- */
-int is_hwpoison_address(unsigned long addr)
-{
- pgd_t *pgdp;
- pud_t pud, *pudp;
- pmd_t pmd, *pmdp;
- pte_t pte, *ptep;
- swp_entry_t entry;
-
- pgdp = pgd_offset(current->mm, addr);
- if (!pgd_present(*pgdp))
- return 0;
- pudp = pud_offset(pgdp, addr);
- pud = *pudp;
- if (!pud_present(pud) || pud_large(pud))
- return 0;
- pmdp = pmd_offset(pudp, addr);
- pmd = *pmdp;
- if (!pmd_present(pmd) || pmd_large(pmd))
- return 0;
- ptep = pte_offset_map(pmdp, addr);
- pte = *ptep;
- pte_unmap(ptep);
- if (!is_swap_pte(pte))
- return 0;
- entry = pte_to_swp_entry(pte);
- return is_hwpoison_entry(entry);
-}
-EXPORT_SYMBOL_GPL(is_hwpoison_address);