Subject: linux-next: manual merge of the vfs tree with the vfs-brauner tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 8 Jul 2025 09:38:37 +1000

Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/fhandle.c

between commit:

  1c5484395f9f ("fhandle: reflow get_path_anchor()")

from the vfs-brauner tree and commit:

  8ae91ad6499b ("fold fs_struct->{lock,seq} into a seqlock")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/fhandle.c
index b1363ead6c5e,e2f8e788d33a..000000000000
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@@ -176,24 -178,9 +176,20 @@@ static int get_path_anchor(int fd, stru
  			return -EBADF;
  		*root = fd_file(f)->f_path;
  		path_get(root);
 +		return 0;
  	}
  
 -	return 0;
 +	if (fd == AT_FDCWD) {
- 		struct fs_struct *fs = current->fs;
- 		spin_lock(&fs->lock);
- 		*root = fs->pwd;
- 		path_get(root);
- 		spin_unlock(&fs->lock);
++		get_fs_pwd(current->fs, root);
 +		return 0;
 +	}
 +
 +	if (fd == FD_PIDFS_ROOT) {
 +		pidfs_get_root(root);
 +		return 0;
 +	}
 +
 +	return -EBADF;
  }
  
  static int vfs_dentry_acceptable(void *context, struct dentry *dentry)