Re: [PATCH v2 1/9] mm/huge_memory: simplify vma_is_specal_huge()

From: Lorenzo Stoakes (Oracle)

Date: Thu Mar 19 2026 - 13:25:46 EST


On Thu, Mar 19, 2026 at 04:52:31PM +0000, Kiryl Shutsemau wrote:
> On Thu, Mar 19, 2026 at 01:00:07PM +0000, Lorenzo Stoakes (Oracle) wrote:
> > This function is confused - it overloads the term 'special' yet again,
> > checks for DAX but in many cases the code explicitly excludes DAX before
> > invoking the predicate.
> >
> > It also unnecessarily checks for vma->vm_file - this has to be present for
> > a driver to have set VMA_MIXEDMAP_BIT or VMA_PFNMAP_BIT.
>
> What enforces this?

f_op->mmap() or ->mmap_prepare() would have to have been called for these
to be set, requiring a file to have file operations to be able to do so.

>
> --
> Kiryl Shutsemau / Kirill A. Shutemov