linux-next: manual merge of the vfs-brauner tree with the overlayfs tree

Message ID 20231010105021.57fa4379@canb.auug.org.au
State New
Headers
Series linux-next: manual merge of the vfs-brauner tree with the overlayfs tree |

Commit Message

Stephen Rothwell Oct. 9, 2023, 11:50 p.m. UTC
  Hi all,

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

  fs/overlayfs/super.c

between commit:

  1e97d6e67406 ("ovl: Move xattr support to new xattrs.c file")

from the overlayfs tree and commit:

  3f644c1cd7b5 ("overlayfs: move xattr tables to .rodata")

from the vfs-brauner tree.

I fixed it up (I used the former version of this file and applied the
following merge fix patch) 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.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 10 Oct 2023 10:47:16 +1100
Subject: [PATCH] fix up for "ovl: Move xattr support to new xattrs.c file"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/overlayfs/xattrs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Stephen Rothwell Oct. 10, 2023, 12:14 a.m. UTC | #1
Hi all,

On Tue, 10 Oct 2023 10:50:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the vfs-brauner tree got a conflict in:
> 
>   fs/overlayfs/super.c
> 
> between commit:
> 
>   1e97d6e67406 ("ovl: Move xattr support to new xattrs.c file")
> 
> from the overlayfs tree and commit:
> 
>   3f644c1cd7b5 ("overlayfs: move xattr tables to .rodata")
> 
> from the vfs-brauner tree.
> 
> I fixed it up (I used the former version of this file and applied the
> following merge fix patch) 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.

Actually needs this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 10 Oct 2023 10:47:16 +1100
Subject: [PATCH] fix up for "ovl: Move xattr support to new xattrs.c file"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/overlayfs/overlayfs.h | 2 +-
 fs/overlayfs/xattrs.c    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index 620d89ba4b6e..ca88b2636a57 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -864,7 +864,7 @@ static inline bool ovl_force_readonly(struct ovl_fs *ofs)
 
 /* xattr.c */
 
-const struct xattr_handler **ovl_xattr_handlers(struct ovl_fs *ofs);
+const struct xattr_handler * const *ovl_xattr_handlers(struct ovl_fs *ofs);
 int ovl_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
 		struct iattr *attr);
 int ovl_getattr(struct mnt_idmap *idmap, const struct path *path,
diff --git a/fs/overlayfs/xattrs.c b/fs/overlayfs/xattrs.c
index 1b16b0abdf91..383978e4663c 100644
--- a/fs/overlayfs/xattrs.c
+++ b/fs/overlayfs/xattrs.c
@@ -251,19 +251,19 @@ static const struct xattr_handler ovl_other_xattr_handler = {
 	.set = ovl_other_xattr_set,
 };
 
-static const struct xattr_handler *ovl_trusted_xattr_handlers[] = {
+static const struct xattr_handler * const ovl_trusted_xattr_handlers[] = {
 	&ovl_own_trusted_xattr_handler,
 	&ovl_other_xattr_handler,
 	NULL
 };
 
-static const struct xattr_handler *ovl_user_xattr_handlers[] = {
+static const struct xattr_handler * const ovl_user_xattr_handlers[] = {
 	&ovl_own_user_xattr_handler,
 	&ovl_other_xattr_handler,
 	NULL
 };
 
-const struct xattr_handler **ovl_xattr_handlers(struct ovl_fs *ofs)
+const struct xattr_handler * const *ovl_xattr_handlers(struct ovl_fs *ofs)
 {
 	return ofs->config.userxattr ? ovl_user_xattr_handlers :
 		ovl_trusted_xattr_handlers;
  
Amir Goldstein Oct. 10, 2023, 11:28 a.m. UTC | #2
On Tue, Oct 10, 2023 at 3:14 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Tue, 10 Oct 2023 10:50:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next merge of the vfs-brauner tree got a conflict in:
> >
> >   fs/overlayfs/super.c
> >
> > between commit:
> >
> >   1e97d6e67406 ("ovl: Move xattr support to new xattrs.c file")
> >
> > from the overlayfs tree and commit:
> >
> >   3f644c1cd7b5 ("overlayfs: move xattr tables to .rodata")
> >

Doh! I should've notice that when I acked the constify patch.

> > from the vfs-brauner tree.
> >
> > I fixed it up (I used the former version of this file and applied the
> > following merge fix patch) 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.
>
> Actually needs this:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 10 Oct 2023 10:47:16 +1100
> Subject: [PATCH] fix up for "ovl: Move xattr support to new xattrs.c file"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/overlayfs/overlayfs.h | 2 +-
>  fs/overlayfs/xattrs.c    | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
> index 620d89ba4b6e..ca88b2636a57 100644
> --- a/fs/overlayfs/overlayfs.h
> +++ b/fs/overlayfs/overlayfs.h
> @@ -864,7 +864,7 @@ static inline bool ovl_force_readonly(struct ovl_fs *ofs)
>
>  /* xattr.c */
>
> -const struct xattr_handler **ovl_xattr_handlers(struct ovl_fs *ofs);
> +const struct xattr_handler * const *ovl_xattr_handlers(struct ovl_fs *ofs);
>  int ovl_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
>                 struct iattr *attr);
>  int ovl_getattr(struct mnt_idmap *idmap, const struct path *path,
> diff --git a/fs/overlayfs/xattrs.c b/fs/overlayfs/xattrs.c
> index 1b16b0abdf91..383978e4663c 100644
> --- a/fs/overlayfs/xattrs.c
> +++ b/fs/overlayfs/xattrs.c
> @@ -251,19 +251,19 @@ static const struct xattr_handler ovl_other_xattr_handler = {
>         .set = ovl_other_xattr_set,
>  };
>
> -static const struct xattr_handler *ovl_trusted_xattr_handlers[] = {
> +static const struct xattr_handler * const ovl_trusted_xattr_handlers[] = {
>         &ovl_own_trusted_xattr_handler,
>         &ovl_other_xattr_handler,
>         NULL
>  };
>
> -static const struct xattr_handler *ovl_user_xattr_handlers[] = {
> +static const struct xattr_handler * const ovl_user_xattr_handlers[] = {
>         &ovl_own_user_xattr_handler,
>         &ovl_other_xattr_handler,
>         NULL
>  };
>
> -const struct xattr_handler **ovl_xattr_handlers(struct ovl_fs *ofs)
> +const struct xattr_handler * const *ovl_xattr_handlers(struct ovl_fs *ofs)
>  {
>         return ofs->config.userxattr ? ovl_user_xattr_handlers :
>                 ovl_trusted_xattr_handlers;
> --

I will rebase overlayfs-next over Christian's vfs.xattr branch and
squash your fix.

Thanks!
Amir.
  

Patch

diff --git a/fs/overlayfs/xattrs.c b/fs/overlayfs/xattrs.c
index 1b16b0abdf91..8a9c76adbf5c 100644
--- a/fs/overlayfs/xattrs.c
+++ b/fs/overlayfs/xattrs.c
@@ -251,13 +251,13 @@  static const struct xattr_handler ovl_other_xattr_handler = {
 	.set = ovl_other_xattr_set,
 };
 
-static const struct xattr_handler *ovl_trusted_xattr_handlers[] = {
+static const struct xattr_handler * const ovl_trusted_xattr_handlers[] = {
 	&ovl_own_trusted_xattr_handler,
 	&ovl_other_xattr_handler,
 	NULL
 };
 
-static const struct xattr_handler *ovl_user_xattr_handlers[] = {
+static const struct xattr_handler * const ovl_user_xattr_handlers[] = {
 	&ovl_own_user_xattr_handler,
 	&ovl_other_xattr_handler,
 	NULL