* [PATCH] xfs: improve __xfs_set_acl
@ 2022-04-21 8:54 Yang Xu
2022-04-24 5:28 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yang Xu @ 2022-04-21 8:54 UTC (permalink / raw)
To: linux-xfs; +Cc: djwong, brauner, Yang Xu
Provide a proper stub for the !CONFIG_XFS_POSIX_ACL case.
Also use a easy way for xfs_get_acl stub.
Suggested-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
fs/xfs/xfs_acl.h | 8 +++++---
fs/xfs/xfs_iops.c | 2 --
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h
index bb6abdcb265d..263404d0bfda 100644
--- a/fs/xfs/xfs_acl.h
+++ b/fs/xfs/xfs_acl.h
@@ -16,11 +16,13 @@ extern int xfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
void xfs_forget_acl(struct inode *inode, const char *name);
#else
-static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type, bool rcu)
+#define xfs_get_acl NULL
+#define xfs_set_acl NULL
+static inline int __xfs_set_acl(struct inode *inode, struct posix_acl *acl,
+ int type)
{
- return NULL;
+ return 0;
}
-# define xfs_set_acl NULL
static inline void xfs_forget_acl(struct inode *inode, const char *name)
{
}
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index b34e8e4344a8..94313b7e9991 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -209,7 +209,6 @@ xfs_generic_create(
if (unlikely(error))
goto out_cleanup_inode;
-#ifdef CONFIG_XFS_POSIX_ACL
if (default_acl) {
error = __xfs_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
if (error)
@@ -220,7 +219,6 @@ xfs_generic_create(
if (error)
goto out_cleanup_inode;
}
-#endif
xfs_setup_iops(ip);
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: improve __xfs_set_acl
2022-04-21 8:54 [PATCH] xfs: improve __xfs_set_acl Yang Xu
@ 2022-04-24 5:28 ` Christoph Hellwig
2022-04-25 9:48 ` Christian Brauner
2022-04-25 16:34 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-04-24 5:28 UTC (permalink / raw)
To: Yang Xu; +Cc: linux-xfs, djwong, brauner
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: improve __xfs_set_acl
2022-04-21 8:54 [PATCH] xfs: improve __xfs_set_acl Yang Xu
2022-04-24 5:28 ` Christoph Hellwig
@ 2022-04-25 9:48 ` Christian Brauner
2022-04-25 16:34 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2022-04-25 9:48 UTC (permalink / raw)
To: Yang Xu; +Cc: linux-xfs, djwong
On Thu, Apr 21, 2022 at 04:54:50PM +0800, Yang Xu wrote:
> Provide a proper stub for the !CONFIG_XFS_POSIX_ACL case.
>
> Also use a easy way for xfs_get_acl stub.
>
> Suggested-by: Christian Brauner (Microsoft) <brauner@kernel.org>
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
Fwiw,
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: improve __xfs_set_acl
2022-04-21 8:54 [PATCH] xfs: improve __xfs_set_acl Yang Xu
2022-04-24 5:28 ` Christoph Hellwig
2022-04-25 9:48 ` Christian Brauner
@ 2022-04-25 16:34 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2022-04-25 16:34 UTC (permalink / raw)
To: Yang Xu; +Cc: linux-xfs, brauner
On Thu, Apr 21, 2022 at 04:54:50PM +0800, Yang Xu wrote:
> Provide a proper stub for the !CONFIG_XFS_POSIX_ACL case.
>
> Also use a easy way for xfs_get_acl stub.
>
> Suggested-by: Christian Brauner (Microsoft) <brauner@kernel.org>
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Seems reasonable to me.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_acl.h | 8 +++++---
> fs/xfs/xfs_iops.c | 2 --
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h
> index bb6abdcb265d..263404d0bfda 100644
> --- a/fs/xfs/xfs_acl.h
> +++ b/fs/xfs/xfs_acl.h
> @@ -16,11 +16,13 @@ extern int xfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
> extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
> void xfs_forget_acl(struct inode *inode, const char *name);
> #else
> -static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type, bool rcu)
> +#define xfs_get_acl NULL
> +#define xfs_set_acl NULL
> +static inline int __xfs_set_acl(struct inode *inode, struct posix_acl *acl,
> + int type)
> {
> - return NULL;
> + return 0;
> }
> -# define xfs_set_acl NULL
> static inline void xfs_forget_acl(struct inode *inode, const char *name)
> {
> }
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index b34e8e4344a8..94313b7e9991 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -209,7 +209,6 @@ xfs_generic_create(
> if (unlikely(error))
> goto out_cleanup_inode;
>
> -#ifdef CONFIG_XFS_POSIX_ACL
> if (default_acl) {
> error = __xfs_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
> if (error)
> @@ -220,7 +219,6 @@ xfs_generic_create(
> if (error)
> goto out_cleanup_inode;
> }
> -#endif
>
> xfs_setup_iops(ip);
>
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-25 16:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-21 8:54 [PATCH] xfs: improve __xfs_set_acl Yang Xu
2022-04-24 5:28 ` Christoph Hellwig
2022-04-25 9:48 ` Christian Brauner
2022-04-25 16:34 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox