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

Lorenzo Stoakes (Oracle)
2026-03-19T17:16:10Z

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