Re: [PATCH v6 01/11] mm: add MAP_HUGETLB support to vm_mmap

From: Christoph Hellwig
Date: Fri Sep 08 2017 - 03:42:20 EST


On Thu, Sep 07, 2017 at 11:35:59AM -0600, Tycho Andersen wrote:
> vm_mmap is exported, which means kernel modules can use it. In particular,
> for testing XPFO support, we want to use it with the MAP_HUGETLB flag, so
> let's support it via vm_mmap.

> } else if (flags & MAP_HUGETLB) {
> + file = map_hugetlb_setup(&len, flags);
> if (IS_ERR(file))
> return PTR_ERR(file);
> }

It seems like you should remove this hunk entirely and make all
MAP_HUGETLB calls go through vm_mmap.