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

Message ID 20231220104734.0979a9f8@canb.auug.org.au
State New
Headers
Series linux-next: manual merge of the vfs tree with the f2fs tree |

Commit Message

Stephen Rothwell Dec. 19, 2023, 11:47 p.m. UTC
  Hi all,

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

  fs/f2fs/namei.c

between commit:

  53edb549565f ("f2fs: fix to avoid dirent corruption")

from the f2fs tree and commit:

  7deee77b993a ("f2fs: Avoid reading renamed directory if parent does not change")

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.
  

Comments

Stephen Rothwell Dec. 20, 2023, 12:13 a.m. UTC | #1
Hi Al,

On Wed, 20 Dec 2023 10:47:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/f2fs/namei.c
> 
> between commit:
> 
>   53edb549565f ("f2fs: fix to avoid dirent corruption")
> 
> from the f2fs tree and commit:
> 
>   7deee77b993a ("f2fs: Avoid reading renamed directory if parent does not change")
> 
> 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.

Then I remembered to look at your suggested resolution and redid it
like you did (see below).
  
Al Viro Dec. 20, 2023, 1:34 a.m. UTC | #2
On Wed, Dec 20, 2023 at 11:13:25AM +1100, Stephen Rothwell wrote:
> Hi Al,
> 
> On Wed, 20 Dec 2023 10:47:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next merge of the vfs tree got a conflict in:
> > 
> >   fs/f2fs/namei.c
> > 
> > between commit:
> > 
> >   53edb549565f ("f2fs: fix to avoid dirent corruption")
> > 
> > from the f2fs tree and commit:
> > 
> >   7deee77b993a ("f2fs: Avoid reading renamed directory if parent does not change")
> > 
> > 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.
> 
> Then I remembered to look at your suggested resolution and redid it
> like you did (see below).

My suggested resolution had been wrong, actually - the way it's written,
link count drop should be conditional on old_is_dir, cross-directory or
not.

I think the right solution is
	if (old_dir_entry)
		f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir);
        if (old_is_dir)
		f2fs_i_links_write(old_dir, false);
  
Stephen Rothwell Dec. 20, 2023, 3:05 a.m. UTC | #3
Hi Al,

On Wed, 20 Dec 2023 01:34:02 +0000 Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> My suggested resolution had been wrong, actually - the way it's written,
> link count drop should be conditional on old_is_dir, cross-directory or
> not.
> 
> I think the right solution is
> 	if (old_dir_entry)
> 		f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir);
>         if (old_is_dir)
> 		f2fs_i_links_write(old_dir, false);

Ok, I will fix it up.
  
Al Viro Dec. 20, 2023, 4:44 a.m. UTC | #4
On Wed, Dec 20, 2023 at 02:05:29PM +1100, Stephen Rothwell wrote:
> Hi Al,
> 
> On Wed, 20 Dec 2023 01:34:02 +0000 Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > My suggested resolution had been wrong, actually - the way it's written,
> > link count drop should be conditional on old_is_dir, cross-directory or
> > not.
> > 
> > I think the right solution is
> > 	if (old_dir_entry)
> > 		f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir);
> >         if (old_is_dir)
> > 		f2fs_i_links_write(old_dir, false);
> 
> Ok, I will fix it up.

Backmerge with conflict resolution added to #for-next...
  

Patch

diff --cc fs/f2fs/namei.c
index ede6afb81762,fdc97df6bb85..000000000000
--- a/fs/f2fs/namei.c