Skip to contentSkip to conversation

linux-next: build failure after merge of the overlayfs tree

PATCH Stephen Rothwell 2 participants 3 messages Aug 18, 2021 – Sep 2, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the overlayfs tree, today's linux-next build (x86_64 allmodconfig) failed like this:

fs/ntfs3/file.c:1231:13: error: initialization of 'struct posix_acl * (*)(struct inode *, int, bool)' {aka 'struct posix_acl * (*)(struct inode *, int, _Bool)'} from incompatible pointer type 'struct posix_acl * (*)(struct inode *, int)' [-Werror=incompatible-pointer-types]
1231 | .get_acl = ntfs_get_acl,

      |             ^~~~~~~~~~~~

fs/ntfs3/file.c:1231:13: note: (near initialization for 'ntfs_file_inode_operations.get_acl')

Caused by commit

0cad6246621b ("vfs: add rcu argument to ->get_acl() callback")

interacting with commits

4534a70b7056 ("fs/ntfs3: Add headers and misc files") 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")

from the ntfs3 tree.

I have added the following merge resolution patch.

From: Stephen Rothwell <[email protected]>
Date: Thu, 19 Aug 2021 09:31:21 +1000
Subject: [PATCH] ntfs3: fix up for "vfs: add rcu argument to ->get_acl() callback"

---
 fs/ntfs3/ntfs_fs.h | 2 +-
 fs/ntfs3/xattr.c   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
fs/ntfs3/ntfs_fs.h +1 -1
index 0c3ac89c3115..a0655b8b7be1 100644
@@ -787,7 +787,7 @@ int ntfs_cmp_names_cpu(const struct cpu_str *uni1, const struct le_str *uni2,
 
 /* globals from xattr.c */
 #ifdef CONFIG_NTFS3_FS_POSIX_ACL
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu);
 int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
 		 struct posix_acl *acl, int type);
 int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
fs/ntfs3/xattr.c +5 -2
index 98871c895e77..9239c388050e 100644
@@ -539,8 +539,11 @@ static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
  *
  * inode_operations::get_acl
  */
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu)
 {
+	if (rcu)
+		return ERR_PTR(-ECHILD);
+
 	/* TODO: init_user_ns? */
 	return ntfs_get_acl_ex(&init_user_ns, inode, type, 0);
 }
@@ -640,7 +643,7 @@ static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns,
 	if (!(inode->i_sb->s_flags & SB_POSIXACL))
 		return -EOPNOTSUPP;
 
-	acl = ntfs_get_acl(inode, type);
+	acl = ntfs_get_acl(inode, type, false);
 	if (IS_ERR(acl))
 		return PTR_ERR(acl);
 
Signature · 5 lines
2.32.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 64 lines · On Thu, 19 Aug 2021 09:39:10 +1000 Stephen Rothwell <[email protected]>…

After merging the overlayfs tree, today's linux-next build (x86_64 allmodconfig) failed like this:

fs/ntfs3/file.c:1231:13: error: initialization of 'struct posix_acl * (*)(struct inode *, int, bool)' {aka 'struct posix_acl * (*)(struct inode *, int, _Bool)'} from incompatible pointer type 'struct posix_acl * (*)(struct inode *, int)' [-Werror=incompatible-pointer-types]
1231 | .get_acl = ntfs_get_acl,

      |             ^~~~~~~~~~~~

fs/ntfs3/file.c:1231:13: note: (near initialization for 'ntfs_file_inode_operations.get_acl')

Caused by commit

0cad6246621b ("vfs: add rcu argument to ->get_acl() callback")

interacting with commits

4534a70b7056 ("fs/ntfs3: Add headers and misc files") 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")

from the ntfs3 tree.

I have added the following merge resolution patch.

From: Stephen Rothwell <[email protected]>
Date: Thu, 19 Aug 2021 09:31:21 +1000
Subject: [PATCH] ntfs3: fix up for "vfs: add rcu argument to ->get_acl() callback"

---
 fs/ntfs3/ntfs_fs.h | 2 +-
 fs/ntfs3/xattr.c   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
fs/ntfs3/ntfs_fs.h +1 -1
index 0c3ac89c3115..a0655b8b7be1 100644
@@ -787,7 +787,7 @@ int ntfs_cmp_names_cpu(const struct cpu_str *uni1, const struct le_str *uni2,
 
 /* globals from xattr.c */
 #ifdef CONFIG_NTFS3_FS_POSIX_ACL
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu);
 int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
 		 struct posix_acl *acl, int type);
 int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
fs/ntfs3/xattr.c +4 -1
index 98871c895e77..9239c388050e 100644
@@ -539,8 +539,11 @@ static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
  *
  * inode_operations::get_acl
  */
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu)
 {
+	if (rcu)
+		return ERR_PTR(-ECHILD);
+
 	/* TODO: init_user_ns? */
 	return ntfs_get_acl_ex(&init_user_ns, inode, type, 0);
 }

fs/ntfs3/xattr.c static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns, · line 649

Quoted 8 lines
fs/ntfs3/xattr.c +1 -1
@@ -640,7 +643,7 @@ static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns,
 	if (!(inode->i_sb->s_flags & SB_POSIXACL))
 		return -EOPNOTSUPP;
 
-	acl = ntfs_get_acl(inode, type);
+	acl = ntfs_get_acl(inode, type, false);
 	if (IS_ERR(acl))
 		return PTR_ERR(acl);
 

This merge fix patch is now needed when the ntfs3 tree is merged with Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 3 lines · Stephen Rothwell

This merge fix patch is now needed when the ntfs3 tree is merged with Linus' tree.

.. but again, DO NOT APPLY THAT MERGE FIX, because before it is merged into my tree, it would be wrong and wouldn't even compile.

So just point out this semantic conflict in the pull request.

I'll see it myself when I do the test build, and I'd fix it up even without that, but this is one of those "make sure everybody is on the same page" things so that it doesn't fall through the cracks and everybody knows what to expect.

Linus