linux-next: manual merge of the pidfd tree with the f2fs tree
Hi all,
Today's linux-next merge of the pidfd tree got a conflict in:
fs/f2fs/file.c
between commits:
19bb7075d1a9 ("f2fs: fix out-of-repair __setattr_copy()")
7cf2e6173b2d ("f2fs: enhance to update i_mode and acl atomically in f2fs_setattr()")
from the f2fs tree and commit:
2f221d6f7b88 ("attr: handle idmapped mounts")
e65ce2a50cf6 ("acl: handle idmapped mounts")
from the pidfd 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.
Signature · 41 lines
Cheers,
Stephen Rothwell
diff --cc fs/f2fs/file.c
index 7db27c81d034,8f1e97e7d242..000000000000
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@@ -851,9 -848,9 +852,10 @@@ static void __setattr_copy(struct user_
inode->i_ctime = attr->ia_ctime;
if (ia_valid & ATTR_MODE) {
umode_t mode = attr->ia_mode;
+ kgid_t kgid = i_gid_into_mnt(mnt_userns, inode);
- if (!in_group_p(inode->i_gid) &&
- !capable_wrt_inode_uidgid(inode, CAP_FSETID))
- if (!in_group_p(kgid) && !capable(CAP_FSETID))
++ if (!in_group_p(kgid) &&
++ !capable_wrt_inode_uidgid(mnt_userns, inode, CAP_FSETID))
mode &= ~S_ISGID;
set_acl_inode(inode, mode);
}
@@@ -958,14 -948,13 +961,14 @@@ int f2fs_setattr(struct user_namespace
spin_unlock(&F2FS_I(inode)->i_size_lock);
}
- __setattr_copy(inode, attr);
+ __setattr_copy(&init_user_ns, inode, attr);
if (attr->ia_valid & ATTR_MODE) {
- err = posix_acl_chmod(inode, f2fs_get_inode_mode(inode));
-
+ err = posix_acl_chmod(&init_user_ns, inode,
+ f2fs_get_inode_mode(inode));
- if (err || is_inode_flag_set(inode, FI_ACL_MODE)) {
- inode->i_mode = F2FS_I(inode)->i_acl_mode;
+ if (is_inode_flag_set(inode, FI_ACL_MODE)) {
+ if (!err)
+ inode->i_mode = F2FS_I(inode)->i_acl_mode;
clear_inode_flag(inode, FI_ACL_MODE);
}
}Hi all,
Quoted 52 lines · On Mon, 25 Jan 2021 16:48:06 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/f2fs/file.cbetween commits:
19bb7075d1a9("f2fs: fix out-of-repair__setattr_copy()")
7cf2e6173b2d("f2fs: enhance to updatei_modeand acl atomically inf2fs_setattr()")from the f2fs tree and commit:
2f221d6f7b88("attr: handle idmapped mounts")
e65ce2a50cf6("acl: handle idmapped mounts")from the pidfd 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.
fs/f2fs/file.c +4
-5@@@ -851,9 -848,9 +852,10 @@@ static void __setattr_copy(struct user_ inode->i_ctime = attr->ia_ctime;if (ia_valid &ATTR_MODE ) {umode_t mode = attr->ia_mode; +kgid_t kgid =i_gid_into_mnt (mnt_userns, inode); -if (!in_group_p (inode->i_gid) && - !capable_wrt_inode_uidgid (inode,CAP_FSETID )) - if (!in_group_p(kgid) && !capable(CAP_FSETID)) ++ if (!in_group_p(kgid) && ++ !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) mode &= ~S_ISGID;set_acl_inode (inode, mode); }@@@ -958,14 -948,13 +961,14 @@@ int f2fs_setattr(struct user_namespacespin_unlock (&F2FS_I (inode)->i_size_lock); } -__setattr_copy (inode, attr); +__setattr_copy (&init_user_ns, inode, attr);if (attr->ia_valid &ATTR_MODE ) { - err =posix_acl_chmod (inode,f2fs_get_inode_mode (inode)); -
fs/f2fs/file.c
Quoted 10 lines
fs/f2fs/file.c +2
-0+ err =posix_acl_chmod (&init_user_ns, inode, +f2fs_get_inode_mode (inode)); - if (err || is_inode_flag_set(inode, FI_ACL_MODE)) { - inode->i_mode =F2FS_I (inode)->i_acl_mode; + if (is_inode_flag_set(inode, FI_ACL_MODE)) { + if (!err) + inode->i_mode =F2FS_I (inode)->i_acl_mode;clear_inode_flag (inode,FI_ACL_MODE ); } }
With the merge window about to open, this is a reminder that this conflict still exists.
The fsf2 tree commits are now
17232e830afb ("f2fs: enhance to update i_mode and acl atomically in f2fs_setattr()") 2562515f0ad7 ("f2fs: fix out-of-repair __setattr_copy()")
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 68 lines · On Mon, 15 Feb 2021 08:01:44 +1100 Stephen Rothwell <[email protected]>…
Quoted 52 lines · On Mon, 25 Jan 2021 16:48:06 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/f2fs/file.cbetween commits:
19bb7075d1a9("f2fs: fix out-of-repair__setattr_copy()")
7cf2e6173b2d("f2fs: enhance to updatei_modeand acl atomically inf2fs_setattr()")from the f2fs tree and commit:
2f221d6f7b88("attr: handle idmapped mounts")
e65ce2a50cf6("acl: handle idmapped mounts")from the pidfd 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.
fs/f2fs/file.c +4
-5@@@ -851,9 -848,9 +852,10 @@@ static void __setattr_copy(struct user_ inode->i_ctime = attr->ia_ctime;if (ia_valid &ATTR_MODE ) {umode_t mode = attr->ia_mode; +kgid_t kgid =i_gid_into_mnt (mnt_userns, inode); -if (!in_group_p (inode->i_gid) && - !capable_wrt_inode_uidgid (inode,CAP_FSETID )) - if (!in_group_p(kgid) && !capable(CAP_FSETID)) ++ if (!in_group_p(kgid) && ++ !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) mode &= ~S_ISGID;set_acl_inode (inode, mode); }@@@ -958,14 -948,13 +961,14 @@@ int f2fs_setattr(struct user_namespacespin_unlock (&F2FS_I (inode)->i_size_lock); } -__setattr_copy (inode, attr); +__setattr_copy (&init_user_ns, inode, attr);if (attr->ia_valid &ATTR_MODE ) { - err =posix_acl_chmod (inode,f2fs_get_inode_mode (inode)); -fs/f2fs/file.c
Quoted 10 lines
fs/f2fs/file.c +2
-0+ err =posix_acl_chmod (&init_user_ns, inode, +f2fs_get_inode_mode (inode)); - if (err || is_inode_flag_set(inode, FI_ACL_MODE)) { - inode->i_mode =F2FS_I (inode)->i_acl_mode; + if (is_inode_flag_set(inode, FI_ACL_MODE)) { + if (!err) + inode->i_mode =F2FS_I (inode)->i_acl_mode;clear_inode_flag (inode,FI_ACL_MODE ); } }With the merge window about to open, this is a reminder that this conflict still exists.
Quoted 4 lines
The fsf2 tree commits are now
17232e830afb("f2fs: enhance to updatei_modeand acl atomically inf2fs_setattr()")2562515f0ad7("f2fs: fix out-of-repair__setattr_copy()")
This is now a conflict between the pidfd tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell