Skip to contentSkip to conversation

mm: include linux/pagemap.h where needed

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 12, 2024 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: include linux/pagemap.h where needed

From: Arnd Bergmann <[email protected]>

The pagemap header used to be included by accident here but is now missing:

mm/z3fold.c: In function 'free_z3fold_page':
mm/z3fold.c:353:17: error: implicit declaration of function 'lock_page'; did you mean 'copy_page'? [-Wimplicit-function-declaration]

  353 |                 lock_page(page);
      |                 ^~~~~~~~~
      |                 copy_page

Add the correct #include statement.

Fixes a6c37165ca40 ("mempolicy.h: remove unnecessary header file inclusions with no test failure")
---
 mm/z3fold.c | 1 +
 1 file changed, 1 insertion(+)
mm/z3fold.c +1 -0
index 379d24b4fef9..4ae93bb2e3ab 100644
@@ -30,6 +30,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/page-flags.h>
+#include <linux/pagemap.h>
 #include <linux/migrate.h>
 #include <linux/node.h>
 #include <linux/compaction.h>
Signature · 1 line
2.39.5
#1 lore raw
Quoted 24 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The pagemap header used to be included by accident here but is now missing:

mm/z3fold.c: In function 'free_z3fold_page':
mm/z3fold.c:353:17: error: implicit declaration of function 'lock_page'; did you mean 'copy_page'? [-Wimplicit-function-declaration]

   353 |                 lock_page(page);
       |                 ^~~~~~~~~
       |                 copy_page

Add the correct #include statement.

Fixes a6c37165ca40 ("mempolicy.h: remove unnecessary header file inclusions with no test failure")
---
  mm/z3fold.c | 1 +
  1 file changed, 1 insertion(+)
mm/z3fold.c +0 -0
index 379d24b4fef9..4ae93bb2e3ab 100644

mm/z3fold.c line 36

Quoted 7 lines
mm/z3fold.c +1 -0
@@ -30,6 +30,7 @@
  #include <linux/mm.h>
  #include <linux/module.h>
  #include <linux/page-flags.h>
+#include <linux/pagemap.h>
  #include <linux/migrate.h>
  #include <linux/node.h>
  #include <linux/compaction.h>

Thank you for your fix!