Re: [PATCH v9 05/15] guest_memfd: Use folio_has_hwpoisoned_page()
"David Hildenbrand (Arm)" <[email protected]>
| Newsgroups | org.kernel.vger.linux-fsdevel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/26 23:05, Matthew Wilcox (Oracle) wrote: > folio_test_hwpoison() only works on hugetlb folios today and will give > the wrong answer for other large folios. folio_has_hwpoisoned_page() > works on both. > > Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> > Acked-by: Sean Christopherson <[email protected]> > Reviewed-by: Ackerley Tng <[email protected]> > Reviewed-by: Gregory Price <[email protected]> > Reviewed-by: Jane Chu <[email protected]> > --- > virt/kvm/guest_memfd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c > index db57c5766ab6..94eedcc7f1a9 100644 > --- a/virt/kvm/guest_memfd.c > +++ b/virt/kvm/guest_memfd.c > @@ -774,7 +774,7 @@ static struct folio *__kvm_gmem_get_pfn(struct file *file, > if (IS_ERR(folio)) > return folio; > > - if (folio_test_hwpoison(folio)) { > + if (folio_has_hwpoisoned_page(folio)) { > folio_unlock(folio); > folio_put(folio); > return ERR_PTR(-EHWPOISON); guest_memfd only uses small folios, so it doesn't really matter. Acked-by: David Hildenbrand (Arm) <[email protected]> -- Cheers, David