diff mbox series

[5/8] mm/memory-failure.c: remove PageSlab check in hwpoison_filter_dev

Message ID 20220210141733.1908-6-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series mm/memory-failure.c: A few cleanup patches for memory failure | expand

Commit Message

Miaohe Lin Feb. 10, 2022, 2:17 p.m. UTC
Since commit 03e5ac2fc3bf ("mm: fix crash when using XFS on loopback"),
page_mapping() can handle the Slab pages. So remove this unnecessary
PageSlab check and obsolete comment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/memory-failure.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Naoya Horiguchi Feb. 14, 2022, 2:50 p.m. UTC | #1
On Thu, Feb 10, 2022 at 10:17:30PM +0800, Miaohe Lin wrote:
> Since commit 03e5ac2fc3bf ("mm: fix crash when using XFS on loopback"),
> page_mapping() can handle the Slab pages. So remove this unnecessary
> PageSlab check and obsolete comment.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
diff mbox series

Patch

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 4370c2f407c5..71bd78279669 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -130,12 +130,6 @@  static int hwpoison_filter_dev(struct page *p)
 	    hwpoison_filter_dev_minor == ~0U)
 		return 0;
 
-	/*
-	 * page_mapping() does not accept slab pages.
-	 */
-	if (PageSlab(p))
-		return -EINVAL;
-
 	mapping = page_mapping(p);
 	if (mapping == NULL || mapping->host == NULL)
 		return -EINVAL;