diff mbox series

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

Message ID 20240913133240.066ae790@canb.auug.org.au (mailing list archive)
State Superseded
Headers show
Series linux-next: build failure after merge of the bpf-next tree | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Stephen Rothwell Sept. 13, 2024, 3:32 a.m. UTC
Hi all,

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

fs/namespace.c: In function 'grab_requested_mnt_ns':
fs/namespace.c:5299:23: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 5299 |                 if (!f.file)
      |                       ^
fs/namespace.c:5302:36: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 5302 |                 if (!proc_ns_file(f.file))
      |                                    ^
In file included from fs/namespace.c:25:
fs/namespace.c:5305:46: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 5305 |                 ns = get_proc_ns(file_inode(f.file));
      |                                              ^
include/linux/proc_ns.h:75:50: note: in definition of macro 'get_proc_ns'
   75 | #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private)
      |                                                  ^~~~~

Caused by commit

  1da91ea87aef ("introduce fd_file(), convert all accessors to it.")

interacting with commit

  7b9d14af8777 ("fs: allow mount namespace fd")

Comments

Stephen Rothwell Sept. 15, 2024, 11:26 p.m. UTC | #1
Hi all,

On Fri, 13 Sep 2024 13:32:40 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the bpf-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> fs/namespace.c: In function 'grab_requested_mnt_ns':
> fs/namespace.c:5299:23: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
>  5299 |                 if (!f.file)
>       |                       ^
> fs/namespace.c:5302:36: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
>  5302 |                 if (!proc_ns_file(f.file))
>       |                                    ^
> In file included from fs/namespace.c:25:
> fs/namespace.c:5305:46: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
>  5305 |                 ns = get_proc_ns(file_inode(f.file));
>       |                                              ^
> include/linux/proc_ns.h:75:50: note: in definition of macro 'get_proc_ns'
>    75 | #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private)
>       |                                                  ^~~~~
> 
> Caused by commit
> 
>   1da91ea87aef ("introduce fd_file(), convert all accessors to it.")
> 
> interacting with commit
> 
>   7b9d14af8777 ("fs: allow mount namespace fd")
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 13 Sep 2024 13:27:11 +1000
> Subject: [PATCH] fixe up for "introduce fd_file(), convert all accessors to it."
> 
> interacting with "fs: allow mount namespace fd" from the vfs-brauner tree.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/namespace.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 8e88938d3f19..cad6dd5db2da 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -5296,13 +5296,13 @@ static struct mnt_namespace *grab_requested_mnt_ns(const struct mnt_id_req *kreq
>  		struct ns_common *ns;
>  
>  		CLASS(fd, f)(kreq->spare);
> -		if (!f.file)
> +		if (!fd_file(f))
>  			return ERR_PTR(-EBADF);
>  
> -		if (!proc_ns_file(f.file))
> +		if (!proc_ns_file(fd_file(f)))
>  			return ERR_PTR(-EINVAL);
>  
> -		ns = get_proc_ns(file_inode(f.file));
> +		ns = get_proc_ns(file_inode(fd_file(f)));
>  		if (ns->ops->type != CLONE_NEWNS)
>  			return ERR_PTR(-EINVAL);
>  
> -- 
> 2.45.2
> 

This is now required in the merge of the vfs tree.
diff mbox series

Patch

diff --git a/fs/namespace.c b/fs/namespace.c
index 8e88938d3f19..cad6dd5db2da 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -5296,13 +5296,13 @@  static struct mnt_namespace *grab_requested_mnt_ns(const struct mnt_id_req *kreq
 		struct ns_common *ns;
 
 		CLASS(fd, f)(kreq->spare);
-		if (!f.file)
+		if (!fd_file(f))
 			return ERR_PTR(-EBADF);
 
-		if (!proc_ns_file(f.file))
+		if (!proc_ns_file(fd_file(f)))
 			return ERR_PTR(-EINVAL);
 
-		ns = get_proc_ns(file_inode(f.file));
+		ns = get_proc_ns(file_inode(fd_file(f)));
 		if (ns->ops->type != CLONE_NEWNS)
 			return ERR_PTR(-EINVAL);