]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/memory-failure.c: remove PageSlab check in hwpoison_filter_dev
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 22 Mar 2022 21:44:24 +0000 (14:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:07 +0000 (15:57 -0700)
Since commit 836af871a108 ("mm: fix crash when using XFS on loopback"),
page_mapping() can handle the Slab pages.  So remove this unnecessary
PageSlab check and obsolete comment.

Link: https://lkml.kernel.org/r/20220218090118.1105-6-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c

index 79a32be5e7df3420a4cf065c107b2bf56442e972..ac3d582d84b2b8e2fa26d74fe7c9fe86d0cec84e 100644 (file)
@@ -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;