memfd_create(3): Don't actually force hugetlb size with MFD_HUGETLB
The size flags are only required to select a size on systems that support multiple sizes. MFD_HUGETLB by itself is valid.
This commit is contained in:
parent
2748dea7b2
commit
a32b126360
@ -88,9 +88,6 @@ memfd_create(const char *name, unsigned int flags)
|
||||
if ((flags & ~(MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB |
|
||||
MFD_HUGE_MASK)) != 0)
|
||||
return (EINVAL);
|
||||
/* HUGETLB set with no size specified. */
|
||||
if ((flags & MFD_HUGETLB) != 0 && (flags & MFD_HUGE_MASK) == 0)
|
||||
return (EINVAL);
|
||||
/* Size specified but no HUGETLB. */
|
||||
if ((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0)
|
||||
return (EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user