Skip to contentSkip to conversation

overlayfs: include linux/pagemap.h for PAGE_CACHE_SIZE

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 10, 2015 Overlay filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 overlayfs: include linux/pagemap.h for PAGE_CACHE_SIZE

The overlayfs has started enforcing a maximum file size, but is missing the header file that defines the PAGE_CACHE_SIZE constant in some configurations.

fs/overlayfs/super.c: In function 'ovl_fill_super':
fs/overlayfs/super.c:939:29: error: 'PAGE_CACHE_SIZE' undeclared (first use in this function)

Fixes 7b1746cac878 ("ovl: setattr: check permissions before copy-up")

---
The patch that introduced this was marked for stable, so I'm marking this the same way.

fs/overlayfs/super.c +1 -0
index ea94e50a3473..a4cbdf9824c7 100644
@@ -9,6 +9,7 @@
 
 #include <linux/fs.h>
 #include <linux/namei.h>
+#include <linux/pagemap.h>
 #include <linux/xattr.h>
 #include <linux/security.h>
 #include <linux/mount.h>
maintainer
#1 lore raw
Quoted 3 lines · Arnd Bergmann

The overlayfs has started enforcing a maximum file size, but is missing the header file that defines the PAGE_CACHE_SIZE constant in some configurations.

Hmm, it uses MAX_LFS_FILESIZE. MAX_LFS_FILESIZE is defined in <linux/fs.h>, which doesn't include <linux/pagemap.h>.

<linux/pagemap.h> includes <linux/fs.h> however. So shouldn't MAX_LFS_FILESIZE be defined in <linux/pagemap.h> instead?

Thanks,
Miklos

Quoted 24 lines

fs/overlayfs/super.c: In function 'ovl_fill_super':
fs/overlayfs/super.c:939:29: error: 'PAGE_CACHE_SIZE' undeclared (first use in this function)

Fixes 7b1746cac878 ("ovl: setattr: check permissions before copy-up")

---
The patch that introduced this was marked for stable, so I'm marking this the same way.

fs/overlayfs/super.c +1 -0
index ea94e50a3473..a4cbdf9824c7 100644
@@ -9,6 +9,7 @@
 
 #include <linux/fs.h>
 #include <linux/namei.h>
+#include <linux/pagemap.h>
 #include <linux/xattr.h>
 #include <linux/security.h>
 #include <linux/mount.h>