diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2018-03-28 18:41:25 +1100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-03-28 13:29:57 -0500 |
commit | 8ecd2953d0a1b78748b36f5bed6f233f5bd6d6ea (patch) | |
tree | 730f647c662bb0845f3318669c00dc9f3dba913b | |
parent | 0d79cbf83be07bb38a1224f47fd0e2b163310442 (diff) | |
download | linux-stable-8ecd2953d0a1b78748b36f5bed6f233f5bd6d6ea.tar.gz |
ipc/shm: fix up for struct file no longer being available in shm.h
Stephen Rothewell <sfr@canb.auug.org.au> wrote:
> 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)
I dug through this and I discovered that the error was caused by the
removal of struct shmid_kernel from shm.h when building on powerpc.
Except for observing the existence of "struct file *shm_file" in
struct shmid_kernel I have no clue why the structure move would cause
such a failure. I suspect shm.h always needed the forward declaration
and someting had been confusing gcc into not issuing the warning. --EWB
Fixes: a2e102cd3cdd ("shm: Move struct shmid_kernel into ipc/shm.c")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-rw-r--r-- | include/linux/shm.h | 2 |
1 files changed, 2 insertions, 0 deletions
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; |