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

From: Stephen Rothwell
Date: Tue Dec 19 2023 - 19:13:43 EST


Hi Al,

On Wed, 20 Dec 2023 10:47:34 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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).
--
Cheers,
Stephen Rothwell

--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@@ -1104,12 -1106,12 +1105,9 @@@ static int f2fs_rename(struct mnt_idma
iput(whiteout);
}

- if (old_is_dir) {
- if (old_dir_entry && !whiteout)
- f2fs_set_link(old_inode, old_dir_entry,
+ if (old_dir_entry) {
- if (old_dir != new_dir)
- f2fs_set_link(old_inode, old_dir_entry,
++ f2fs_set_link(old_inode, old_dir_entry,
old_dir_page, new_dir);
-- else
-- f2fs_put_page(old_dir_page, 0);
f2fs_i_links_write(old_dir, false);
}
if (F2FS_OPTION(sbi).fsync_mode == FSYNC_MODE_STRICT) {

Attachment: pgpCIr0orJ0O2.pgp
Description: OpenPGP digital signature