linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	Christian Brauner <christian@brauner.io>,
	Seth Forshee <sforshee@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Daeho Jeong <daehojeong@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the f2fs tree with the vfs-idmapping tree
Date: Tue, 31 Jan 2023 10:07:28 +1100	[thread overview]
Message-ID: <20230131100728.6efdb3c5@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]

Hi all,

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

  fs/f2fs/file.c

between commit:

  f2d40141d5d9 ("fs: port inode_init_owner() to mnt_idmap")

from the vfs-idmapping tree and commit:

  81712a1f56dc ("f2fs: synchronize atomic write aborts")

from the f2fs 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/f2fs/file.c
index b90617639743,3efb0852fd48..000000000000
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@@ -2087,19 -2090,28 +2090,28 @@@ static int f2fs_ioc_start_atomic_write(
  		goto out;
  	}
  
- 	/* Create a COW inode for atomic write */
- 	pinode = f2fs_iget(inode->i_sb, fi->i_pino);
- 	if (IS_ERR(pinode)) {
- 		f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
- 		ret = PTR_ERR(pinode);
- 		goto out;
- 	}
+ 	/* Check if the inode already has a COW inode */
+ 	if (fi->cow_inode == NULL) {
+ 		/* Create a COW inode for atomic write */
+ 		pinode = f2fs_iget(inode->i_sb, fi->i_pino);
+ 		if (IS_ERR(pinode)) {
+ 			f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
+ 			ret = PTR_ERR(pinode);
+ 			goto out;
+ 		}
  
- 	ret = f2fs_get_tmpfile(idmap, pinode, &fi->cow_inode);
- 	iput(pinode);
- 	if (ret) {
- 		f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
- 		goto out;
 -		ret = f2fs_get_tmpfile(mnt_userns, pinode, &fi->cow_inode);
++		ret = f2fs_get_tmpfile(idmap, pinode, &fi->cow_inode);
+ 		iput(pinode);
+ 		if (ret) {
+ 			f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
+ 			goto out;
+ 		}
+ 
+ 		set_inode_flag(fi->cow_inode, FI_COW_FILE);
+ 		clear_inode_flag(fi->cow_inode, FI_INLINE_DATA);
+ 	} else {
+ 		/* Reuse the already created COW inode */
+ 		f2fs_do_truncate_blocks(fi->cow_inode, 0, true);
  	}
  
  	f2fs_write_inode(inode, NULL);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-01-30 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 23:07 Stephen Rothwell [this message]
2023-01-30 23:12 linux-next: manual merge of the f2fs tree with the vfs-idmapping tree Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230131100728.6efdb3c5@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=brauner@kernel.org \
    --cc=christian@brauner.io \
    --cc=daehojeong@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sforshee@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).