Skip to contentSkip to conversation

linux-next: build failure after merge of the vfs tree

PATCH Stephen Rothwell 1 participant 1 message Dec 9, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Al,

After merging the vfs tree, today's linux-next build (i386 defconfig) failed like this:

In file included from include/linux/poll.h:9:0,

                 from include/linux/rtc.h:56,
                 from include/linux/mc146818rtc.h:15,
                 from drivers/char/nvram.c:105:
drivers/char/nvram.c: In function 'nvram_llseek':
include/linux/fs.h:898:36: error: 'PAGE_CACHE_SIZE' undeclared (first use in this function)
 #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
                                    ^
drivers/char/nvram.c:216:56: note: in expansion of macro 'MAX_LFS_FILESIZE'
  return generic_file_llseek_size(file, offset, origin, MAX_LFS_FILESIZE,
                                                        ^
include/linux/fs.h:898:36: note: each undeclared identifier is reported only once for each function it appears in
 #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
                                    ^
drivers/char/nvram.c:216:56: note: in expansion of macro 'MAX_LFS_FILESIZE'
  return generic_file_llseek_size(file, offset, origin, MAX_LFS_FILESIZE,
                                                        ^

drivers/char/nvram.c:218:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Caused by commit

acde094daf36 ("don't open-code generic_file_llseek_size()")

I applied the following fix patch for today.

From: Stephen Rothwell <[email protected]>
Date: Wed, 9 Dec 2015 16:48:00 +1100
Subject: [PATCH] fix for "don't open-code generic_file_llseek_size()"

---
 drivers/char/nvram.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/nvram.c +1 -0
index 2157787cf11b..78a1cd690c96 100644
@@ -39,6 +39,7 @@
 
 #include <linux/module.h>
 #include <linux/nvram.h>
+#include <linux/pagemap.h>	/* for PAGE_CACHE_SIZE */
 
 #define PC		1
 #define ATARI		2
Signature · 5 lines
2.6.2

-- 
Cheers,
Stephen Rothwell                    [email protected]