Subject: linux-next: build failure after merge of the userns tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 28 Mar 2018 18:41:25 +1100

Hi Eric,

After merging the userns tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from include/linux/sched.h:16:0,
                 from arch/powerpc/lib/xor_vmx_glue.c:14:
include/linux/shm.h:17:35: error: 'struct file' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 bool is_file_shm_hugepages(struct file *file);
                                   ^~~~

and many, many more (most warnings, but some errors - arch/powerpc is
mostly built with -Werror)

Maybe caused by commit

  1a5c1349d105 ("sem: Move struct sem and struct sem_array into ipc/sem.c")

I have appplied the following fix patch for today:

From: Stephen Rothwell <[email-masked]>
Date: Wed, 28 Mar 2018 18:36:27 +1100
Subject: [PATCH] fix up for struct file no longer being available in shm.h

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 include/linux/shm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/shm.h b/include/linux/shm.h
index 3a8eae3ca33c..d8e69aed3d32 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -7,6 +7,8 @@
 #include <uapi/linux/shm.h>
 #include <asm/shmparam.h>
 
+struct file;
+
 #ifdef CONFIG_SYSVIPC
 struct sysv_shm {
 	struct list_head shm_clist;
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell