diff mbox series

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

Message ID 20240814112504.42f77e3c@canb.auug.org.au (mailing list archive)
State Not Applicable
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 Aug. 14, 2024, 1:25 a.m. UTC
Hi all,

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

fs/xattr.c: In function 'path_getxattrat':
fs/xattr.c:832:23: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  832 |                 if (!f.file)
      |                       ^
fs/xattr.c:834:29: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  834 |                 audit_file(f.file);
      |                             ^
fs/xattr.c:835:49: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  835 |                 return getxattr(file_mnt_idmap(f.file), file_dentry(f.file),
      |                                                 ^
fs/xattr.c:835:70: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  835 |                 return getxattr(file_mnt_idmap(f.file), file_dentry(f.file),
      |                                                                      ^
fs/xattr.c: In function 'path_listxattrat':
fs/xattr.c:952:23: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  952 |                 if (!f.file)
      |                       ^
fs/xattr.c:954:29: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  954 |                 audit_file(f.file);
      |                             ^
fs/xattr.c:955:47: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
  955 |                 return listxattr(file_dentry(f.file), list, size);
      |                                               ^
fs/xattr.c: In function 'do_fremovexattr':
fs/xattr.c:1021:15: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1021 |         if (!f.file)
      |               ^
fs/xattr.c:1023:21: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1023 |         audit_file(f.file);
      |                     ^
fs/xattr.c:1031:38: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1031 |         error = mnt_want_write_file(f.file);
      |                                      ^
fs/xattr.c:1033:53: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1033 |                 error = removexattr(file_mnt_idmap(f.file),
      |                                                     ^
fs/xattr.c:1034:38: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1034 |                                     f.file->f_path.dentry, kname);
      |                                      ^
fs/xattr.c:1035:38: error: 'class_fd_t' {aka 'struct fd'} has no member named 'file'
 1035 |                 mnt_drop_write_file(f.file);
      |                                      ^

Caused by commit

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

interacting with commits

  1a61c9d6ec1d ("xattr: handle AT_EMPTY_PATH when setting xattrs")
  278397b2c592 ("xattr: handle AT_EMPTY_PATH when getting xattrs")
  5560ab7ee32e ("xattr: handle AT_EMPTY_PATH when listing xattrs")
  33fce6444e7d ("xattr: handle AT_EMPTY_PATH when removing xattrs")

from the vfs-brauner tree.

I applied the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 14 Aug 2024 11:20:43 +1000
Subject: [PATCH] fixup2 for "introduce fd_file(), convert all accessors to
 it."

interacting with

  1a61c9d6ec1d ("xattr: handle AT_EMPTY_PATH when setting xattrs")
  278397b2c592 ("xattr: handle AT_EMPTY_PATH when getting xattrs")
  5560ab7ee32e ("xattr: handle AT_EMPTY_PATH when listing xattrs")
  33fce6444e7d ("xattr: handle AT_EMPTY_PATH when removing xattrs")

from the vfs-brauner tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/xattr.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

Al Viro Aug. 14, 2024, 1:41 a.m. UTC | #1
On Wed, Aug 14, 2024 at 11:25:04AM +1000, Stephen Rothwell wrote:
>  	if (at_flags & AT_EMPTY_PATH && vfs_empty_path(dfd, pathname)) {
>  		CLASS(fd, f)(dfd);
> -		if (!f.file)
> +		if (!fd_file(f))

		if (fd_empty(f))

actually, and similar for the rest of it.  Anyway, that'll need to be
sorted out in vfs/vfs.git; sorry about the delay.
Stephen Rothwell Aug. 14, 2024, 2:37 a.m. UTC | #2
Hi Al,

On Wed, 14 Aug 2024 02:41:57 +0100 Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Wed, Aug 14, 2024 at 11:25:04AM +1000, Stephen Rothwell wrote:
> >  	if (at_flags & AT_EMPTY_PATH && vfs_empty_path(dfd, pathname)) {
> >  		CLASS(fd, f)(dfd);
> > -		if (!f.file)
> > +		if (!fd_file(f))  
> 
> 		if (fd_empty(f))
> 
> actually, and similar for the rest of it.  Anyway, that'll need to be
> sorted out in vfs/vfs.git; sorry about the delay.

So from tomorrow, the two merge resolution patches will be these:

rom: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 14 Aug 2024 11:07:38 +1000
Subject: [PATCH] fixup 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 159be8ed9d24..7aed325c48ad 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -5292,13 +5292,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_empty(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);
Christian Brauner Aug. 14, 2024, 2:50 p.m. UTC | #3
On Wed, Aug 14, 2024 at 02:41:57AM GMT, Al Viro wrote:
> On Wed, Aug 14, 2024 at 11:25:04AM +1000, Stephen Rothwell wrote:
> >  	if (at_flags & AT_EMPTY_PATH && vfs_empty_path(dfd, pathname)) {
> >  		CLASS(fd, f)(dfd);
> > -		if (!f.file)
> > +		if (!fd_file(f))
> 
> 		if (fd_empty(f))
> 
> actually, and similar for the rest of it.  Anyway, that'll need to be
> sorted out in vfs/vfs.git; sorry about the delay.

You should already have a never rebase branch for the basic
infrastructure. I can just merge that. But I'll just make my usual note
and just provide the required fixups when I send Linus a pr. That'll
work too. /me trying not to have his brain melted by the heat.
Stephen Rothwell Aug. 30, 2024, 1:32 a.m. UTC | #4
Hi all,

On Wed, 14 Aug 2024 11:25:04 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Caused by commit
> 
>   1da91ea87aef ("introduce fd_file(), convert all accessors to it.")
> 
> interacting with commits
> 
>   1a61c9d6ec1d ("xattr: handle AT_EMPTY_PATH when setting xattrs")
>   278397b2c592 ("xattr: handle AT_EMPTY_PATH when getting xattrs")
>   5560ab7ee32e ("xattr: handle AT_EMPTY_PATH when listing xattrs")
>   33fce6444e7d ("xattr: handle AT_EMPTY_PATH when removing xattrs")
> 
> from the vfs-brauner tree.

It looks like he bpf-next tree has lost the above commit, so I have
removed my merge fix patches.
diff mbox series

Patch

diff --git a/fs/xattr.c b/fs/xattr.c
index fa992953fa78..c0ecd0809172 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -829,10 +829,10 @@  static ssize_t path_getxattrat(int dfd, const char __user *pathname,
 
 	if (at_flags & AT_EMPTY_PATH && vfs_empty_path(dfd, pathname)) {
 		CLASS(fd, f)(dfd);
-		if (!f.file)
+		if (!fd_file(f))
 			return -EBADF;
-		audit_file(f.file);
-		return getxattr(file_mnt_idmap(f.file), file_dentry(f.file),
+		audit_file(fd_file(f));
+		return getxattr(file_mnt_idmap(fd_file(f)), file_dentry(fd_file(f)),
 				name, value, size);
 	}
 
@@ -949,10 +949,10 @@  static ssize_t path_listxattrat(int dfd, const char __user *pathname,
 
 	if (at_flags & AT_EMPTY_PATH && vfs_empty_path(dfd, pathname)) {
 		CLASS(fd, f)(dfd);
-		if (!f.file)
+		if (!fd_file(f))
 			return -EBADF;
-		audit_file(f.file);
-		return listxattr(file_dentry(f.file), list, size);
+		audit_file(fd_file(f));
+		return listxattr(file_dentry(fd_file(f)), list, size);
 	}
 
 	lookup_flags = (at_flags & AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;
@@ -1018,9 +1018,9 @@  static int do_fremovexattr(int fd, const char __user *name)
 	int error = -EBADF;
 
 	CLASS(fd, f)(fd);
-	if (!f.file)
+	if (!fd_file(f))
 		return error;
-	audit_file(f.file);
+	audit_file(fd_file(f));
 
 	error = strncpy_from_user(kname, name, sizeof(kname));
 	if (error == 0 || error == sizeof(kname))
@@ -1028,11 +1028,11 @@  static int do_fremovexattr(int fd, const char __user *name)
 	if (error < 0)
 		return error;
 
-	error = mnt_want_write_file(f.file);
+	error = mnt_want_write_file(fd_file(f));
 	if (!error) {
-		error = removexattr(file_mnt_idmap(f.file),
-				    f.file->f_path.dentry, kname);
-		mnt_drop_write_file(f.file);
+		error = removexattr(file_mnt_idmap(fd_file(f)),
+				    fd_file(f)->f_path.dentry, kname);
+		mnt_drop_write_file(fd_file(f));
 	}
 	return error;
 }