Skip to contentSkip to conversation

hugetlb: use mm.h instead of mm_types.h

PATCH Superseded Randy Dunlap 2 participants 2 messages Apr 21, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hugetlb: use mm.h instead of mm_types.h

mm_types.h does not have zap_flags_t in it so use mm.h instead in hugetlb.h.

Fixes this build error:

In file included from ../drivers/virt/nitro_enclaves/ne_misc_dev.c:16:0:
../include/linux/hugetlb.h:414:4: error: unknown type name ‘zap_flags_t’; did you mean ‘vm_flags_t’?
zap_flags_t zap_flags)

Cc Signed-off-by: Peter Xu <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Andrew Morton <[email protected]>

---
Fixes: mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix.patch

 include/linux/hugetlb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/hugetlb.h +1 -1
@@ -2,7 +2,7 @@
 #ifndef _LINUX_HUGETLB_H
 #define _LINUX_HUGETLB_H
 
-#include <linux/mm_types.h>
+#include <linux/mm.h>
 #include <linux/mmdebug.h>
 #include <linux/fs.h>
 #include <linux/hugetlb_inline.h>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Randy Dunlap

mm_types.h does not have zap_flags_t in it so use mm.h instead in hugetlb.h.

Fixes this build error:

In file included from ../drivers/virt/nitro_enclaves/ne_misc_dev.c:16:0:
../include/linux/hugetlb.h:414:4: error: unknown type name ‘zap_flags_t’; did you mean ‘vm_flags_t’?
zap_flags_t zap_flags)

Cc Signed-off-by: Peter Xu <[email protected]>
      ~~~~~~~~~~~~~~~
            ^
            |
            +-------- could drop these..
Quoted 13 lines
Cc Mike Kravetz <[email protected]>
Cc Andrew Morton <[email protected]>

---
Fixes: mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix.patch

 include/linux/hugetlb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

include/linux/hugetlb.h line 8

Quoted 8 lines
include/linux/hugetlb.h +1 -1
@@ -2,7 +2,7 @@
 #ifndef _LINUX_HUGETLB_H
 #define _LINUX_HUGETLB_H
 
-#include <linux/mm_types.h>
+#include <linux/mm.h>
 #include <linux/mmdebug.h>
 #include <linux/fs.h>
 #include <linux/hugetlb_inline.h>

Thanks for fixing it,

Signature · 1 line
Peter Xu