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

From: Stephen Rothwell
Date: Tue May 12 2020 - 06:47:13 EST


Hi all,

After merging the fsinfo tree, today's linux-next build (powerpc
allyesconfig) failed like this:

In file included from fs/fsinfo.c:7:
include/linux/syscalls.h:240:18: error: conflicting types for 'sys_fsinfo'
240 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
| ^~~
include/linux/syscalls.h:226:2: note: in expansion of macro '__SYSCALL_DEFINEx'
226 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
include/linux/syscalls.h:220:36: note: in expansion of macro 'SYSCALL_DEFINEx'
220 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
| ^~~~~~~~~~~~~~~
fs/fsinfo.c:655:1: note: in expansion of macro 'SYSCALL_DEFINE6'
655 | SYSCALL_DEFINE6(fsinfo,
| ^~~~~~~~~~~~~~~
In file included from fs/fsinfo.c:7:
include/linux/syscalls.h:1011:17: note: previous declaration of 'sys_fsinfo' was here
1011 | asmlinkage long sys_fsinfo(int dfd, const char __user *pathname,
| ^~~~~~~~~~

Caused by commit

51d01aee410b ("fsinfo: Add fsinfo() syscall to query filesystem information")

I have added the following patch for today.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Tue, 12 May 2020 20:31:22 +1000
Subject: [PATCH] fix up sys_fsinfo decalaration

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/syscalls.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 76064c0807e5..fa1ecee891c9 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -1009,8 +1009,9 @@ asmlinkage long sys_watch_mount(int dfd, const char __user *path,
asmlinkage long sys_watch_sb(int dfd, const char __user *path,
unsigned int at_flags, int watch_fd, int watch_id);
asmlinkage long sys_fsinfo(int dfd, const char __user *pathname,
- struct fsinfo_params __user *params, size_t params_size,
- void __user *result_buffer, size_t result_buf_size);
+ const struct fsinfo_params __user *params,
+ size_t params_size, void __user *result_buffer,
+ size_t result_buf_size);

/*
* Architecture-specific system calls
--
2.26.2

--
Cheers,
Stephen Rothwell

Attachment: pgpxW24dZoMlz.pgp
Description: OpenPGP digital signature