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

Stephen Rothwell posted 1 patch 3 months ago
There is a newer version of this series
linux-next: manual merge of the vfs tree with the vfs-brauner tree
Posted by Stephen Rothwell 3 months ago
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)
Re: linux-next: manual merge of the vfs tree with the vfs-brauner tree
Posted by Al Viro 3 months ago
On Tue, Jul 08, 2025 at 09:38:37AM +1000, Stephen Rothwell wrote:
> 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.

Umm...  Let's do it that way - fs/fhandle.c chunk of that commit is
trivially split off and the rest should not conflict at all.

Christian, would you mind throwing this on top of your vfs.pidfs?  I'm dropping
that part from my #work.misc commit...

[PATCH] get_path_from_fd(): don't open-code get_fs_pwd()
    
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/fhandle.c b/fs/fhandle.c
index b1363ead6c5e..7c236f64cdea 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -180,11 +180,7 @@ static int get_path_anchor(int fd, struct path *root)
 	}
 
 	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;
 	}
Re: linux-next: manual merge of the vfs tree with the vfs-brauner tree
Posted by Al Viro 3 months ago
On Tue, Jul 08, 2025 at 01:25:09AM +0100, Al Viro wrote:

> Umm...  Let's do it that way - fs/fhandle.c chunk of that commit is
> trivially split off and the rest should not conflict at all.
> 
> Christian, would you mind throwing this on top of your vfs.pidfs?  I'm dropping
> that part from my #work.misc commit...

Argh...  Sorry, no go - that chunk needs to go before the rest of conversion
commit.  Hmm...

See vfs/vfs.git #vfs-6.17.fs_struct; that branches off your "reflow" commit
and it merges clean with #vfs.all, AFAICS.

Are you OK with that variant?  I've no strong preferences re branchpoints,
but some folks do - no idea if you have any policies in that respect.

If you don't have any problems with it, just merge it into #vfs.all
and I'll drop that commit from #work.misc
Re: linux-next: manual merge of the vfs tree with the vfs-brauner tree
Posted by Christian Brauner 3 months ago
On Tue, Jul 08, 2025 at 01:45:50AM +0100, Al Viro wrote:
> On Tue, Jul 08, 2025 at 01:25:09AM +0100, Al Viro wrote:
> 
> > Umm...  Let's do it that way - fs/fhandle.c chunk of that commit is
> > trivially split off and the rest should not conflict at all.
> > 
> > Christian, would you mind throwing this on top of your vfs.pidfs?  I'm dropping
> > that part from my #work.misc commit...
> 
> Argh...  Sorry, no go - that chunk needs to go before the rest of conversion
> commit.  Hmm...
> 
> See vfs/vfs.git #vfs-6.17.fs_struct; that branches off your "reflow" commit
> and it merges clean with #vfs.all, AFAICS.
> 
> Are you OK with that variant?  I've no strong preferences re branchpoints,
> but some folks do - no idea if you have any policies in that respect.

Whatever makes collaboration here easier I'm happy to go with! Thanks
for jumping on this so quicly?

> If you don't have any problems with it, just merge it into #vfs.all
> and I'll drop that commit from #work.misc

Sure! Let me grab it.