linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] overlayfs: improve ovl_get_acl
Date: Wed, 27 Jul 2022 15:33:43 +0200	[thread overview]
Message-ID: <CAJfpeguPSWqy+O2jrTV6mKwXEaKefR33cwOJJ=4wDbiu32Eiqg@mail.gmail.com> (raw)
In-Reply-To: <1657883207-2159-1-git-send-email-xuyang2018.jy@fujitsu.com>

On Fri, 15 Jul 2022 at 12:06, Yang Xu <xuyang2018.jy@fujitsu.com> wrote:
>
> Provide a proper stub for the !CONFIG_FS_POSIX_ACL case.
>
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  fs/overlayfs/inode.c     | 2 +-
>  fs/overlayfs/overlayfs.h | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
> index 492eddeb481f..ba2dde24c1f7 100644
> --- a/fs/overlayfs/inode.c
> +++ b/fs/overlayfs/inode.c
> @@ -460,7 +460,7 @@ struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu)
>         const struct cred *old_cred;
>         struct posix_acl *acl;
>
> -       if (!IS_ENABLED(CONFIG_FS_POSIX_ACL) || !IS_POSIXACL(realinode))
> +       if (!IS_POSIXACL(realinode))
>                 return NULL;
>
>         if (rcu)
> diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
> index 4f34b7e02eee..3d8de16a76e9 100644
> --- a/fs/overlayfs/overlayfs.h
> +++ b/fs/overlayfs/overlayfs.h
> @@ -599,7 +599,13 @@ int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name,
>  int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
>                   void *value, size_t size);
>  ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size);
> +
> +#ifdef CONFIG_FS_POSIX_ACL
>  struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu);
> +#else
> +#define ovl_get_acl    NULL
> +#endif
> +

Shouldn't ovl_get_acl() definition also be wrapped in #ifdef
CONFIG_FS_POSIX_ACL?

Thanks,
Miklos

  reply	other threads:[~2022-07-27 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 11:06 [PATCH] overlayfs: improve ovl_get_acl Yang Xu
2022-07-27 13:33 ` Miklos Szeredi [this message]
2022-07-28  1:50   ` xuyang2018.jy

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='CAJfpeguPSWqy+O2jrTV6mKwXEaKefR33cwOJJ=4wDbiu32Eiqg@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=brauner@kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=xuyang2018.jy@fujitsu.com \
    /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).