linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Eric Van Hensbergen <ericvh@gmail.com>,
	Christian Brauner <christian@brauner.io>,
	Seth Forshee <sforshee@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Eric Van Hensbergen <ericvh@kernel.org>,
	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 v9fs-ericvh tree with the vfs-idmapping tree
Date: Fri, 27 Jan 2023 11:21:49 +1100	[thread overview]
Message-ID: <20230127112149.283a466f@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the v9fs-ericvh tree got conflicts in:

  fs/9p/vfs_inode.c
  fs/9p/vfs_inode_dotl.c

between commit:

  b74d24f7a74f ("fs: port ->getattr() to pass mnt_idmap")

from the vfs-idmapping tree and commit:

  a905b430e998 ("fs/9p: writeback mode fixes")

from the v9fs-ericvh 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/9p/vfs_inode.c
index 4344e7a7865f,c61709d98934..000000000000
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@@ -1038,8 -1009,11 +1009,11 @@@ v9fs_vfs_getattr(struct mnt_idmap *idma
  	p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
  	v9ses = v9fs_dentry2v9ses(dentry);
  	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
- 		generic_fillattr(&nop_mnt_idmap, d_inode(dentry), stat);
 -		generic_fillattr(&init_user_ns, inode, stat);
++		generic_fillattr(&nop_mnt_idmap, inode, stat);
  		return 0;
+ 	} else if (v9ses->cache >= CACHE_WRITEBACK) {
+ 		if (S_ISREG(inode->i_mode))
+ 			filemap_write_and_wait(inode->i_mapping);
  	}
  	fid = v9fs_fid_lookup(dentry);
  	if (IS_ERR(fid))
diff --cc fs/9p/vfs_inode_dotl.c
index 3bed3eb3a0e2,3ad48474bf29..000000000000
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@@ -462,8 -452,11 +452,11 @@@ v9fs_vfs_getattr_dotl(struct mnt_idmap 
  	p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
  	v9ses = v9fs_dentry2v9ses(dentry);
  	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
- 		generic_fillattr(&nop_mnt_idmap, d_inode(dentry), stat);
 -		generic_fillattr(&init_user_ns, inode, stat);
++		generic_fillattr(&nop_mnt_idmap, inode, stat);
  		return 0;
+ 	} else if (v9ses->cache) {
+ 		if (S_ISREG(inode->i_mode))
+ 			filemap_write_and_wait(inode->i_mapping);
  	}
  	fid = v9fs_fid_lookup(dentry);
  	if (IS_ERR(fid))
@@@ -592,12 -589,17 +589,17 @@@ int v9fs_vfs_setattr_dotl(struct mnt_id
  		return retval;
  	}
  
- 	if ((iattr->ia_valid & ATTR_SIZE) &&
- 	    iattr->ia_size != i_size_read(inode))
+ 	if ((iattr->ia_valid & ATTR_SIZE) && iattr->ia_size !=
+ 		 i_size_read(inode)) {
  		truncate_setsize(inode, iattr->ia_size);
+ 		truncate_pagecache(inode, iattr->ia_size);
+ 
+ 		if (v9ses->cache == CACHE_FSCACHE)
+ 			fscache_resize_cookie(v9fs_inode_cookie(v9inode), iattr->ia_size);
+ 	}
  
  	v9fs_invalidate_inode_attr(inode);
 -	setattr_copy(&init_user_ns, inode, iattr);
 +	setattr_copy(&nop_mnt_idmap, inode, iattr);
  	mark_inode_dirty(inode);
  	if (iattr->ia_valid & ATTR_MODE) {
  		/* We also want to update ACL when we update mode bits */

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

                 reply	other threads:[~2023-01-27  0:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230127112149.283a466f@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=brauner@kernel.org \
    --cc=christian@brauner.io \
    --cc=ericvh@gmail.com \
    --cc=ericvh@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).