From 19b2bc9bbc25a94395465fba5900c1f862b5c6a1 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 9 Sep 2019 12:45:51 -0400 Subject: [PATCH] LU-6142 lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL Lustre (or any file system) should not conditionally compile code based on CONFIG_FS_POSIX_ACL. This config option enables library support. A file system can define it's own config option, which then selects CONFIG_FS_POSIX_ACL (if needed). It should act on its own option, not the library one. This patch makes that change. While lustre is out-of-tree, it cannot select CONFIG_FS_POSIX_ACL and must work with the configruation of the kernel it is being built against. So the new CONFIG_LUSTRE_FS_POSIX_ACL can only be selected if the based kernel has CONFIG_FS_POSIX_ACL selected. With that restriction this change becomes little more than an indirection. However it means that the out-of-tree code can be closer to the (eventual) in-tree code. Test-Parameters: trivial Signed-off-by: NeilBrown Change-Id: I3ba283f295d1c7217e7ff9917573be0fe92bb2ca Reviewed-on: https://review.whamcloud.com/36085 Tested-by: jenkins Reviewed-by: Neil Brown Reviewed-by: Petros Koutoupis Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/linux/linux-fs.h | 14 -------------- lustre/autoconf/lustre-core.m4 | 17 +++++++++++++++++ lustre/include/lustre_acl.h | 4 ++-- lustre/include/lustre_compat.h | 17 ++++++++++++++++- lustre/include/lustre_eacl.h | 6 +++--- lustre/include/lustre_mdc.h | 6 +++--- lustre/include/obd.h | 2 +- lustre/llite/file.c | 4 ++-- lustre/llite/llite_internal.h | 6 +++--- lustre/llite/llite_lib.c | 10 +++++----- lustre/llite/xattr.c | 4 ++-- lustre/mdc/mdc_request.c | 6 +++--- lustre/mdd/mdd_dir.c | 4 ++-- lustre/mdd/mdd_object.c | 4 ++-- lustre/mdd/mdd_permission.c | 4 ++-- lustre/mdt/mdt_handler.c | 6 +++--- lustre/mdt/mdt_internal.h | 2 +- lustre/mdt/mdt_open.c | 2 +- lustre/obdclass/acl.c | 2 +- lustre/obdecho/echo_client.c | 2 +- lustre/ptlrpc/wirehdr.c | 4 ++-- lustre/ptlrpc/wiretest.c | 12 ++++++------ 22 files changed, 78 insertions(+), 60 deletions(-) diff --git a/libcfs/include/libcfs/linux/linux-fs.h b/libcfs/include/libcfs/linux/linux-fs.h index e7b6a5d..13c2e50 100644 --- a/libcfs/include/libcfs/linux/linux-fs.h +++ b/libcfs/include/libcfs/linux/linux-fs.h @@ -41,7 +41,6 @@ #include #include #include -#include #ifndef HAVE_FILE_DENTRY static inline struct dentry *file_dentry(const struct file *file) @@ -61,17 +60,4 @@ static inline struct dentry *file_dentry(const struct file *file) #define DTTOIF(dirtype) ((dirtype) << IFSHIFT) #endif -#ifndef HAVE_POSIXACL_USER_NS -/* - * Mask out &init_user_ns so we don't jump - * through hoops to define it somehow only - * to have it ignored anyway. - */ -#define posix_acl_from_xattr(a,b,c) posix_acl_from_xattr(b,c) -#define posix_acl_to_xattr(a,b,c,d) posix_acl_to_xattr(b,c,d) -#endif - -#ifndef HAVE_POSIX_ACL_VALID_USER_NS -#define posix_acl_valid(a,b) posix_acl_valid(b) -#endif #endif diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 28e2b80..210ddaa 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -181,6 +181,22 @@ Lustre quota requires that CONFIG_QUOTA is enabled in your kernel. ])]) ]) # LC_QUOTA_CONFIG + +#[AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])]) +# +# LC_POSIX_ACL_CONFIG +# +# POSIX ACL support. +# +AC_DEFUN([LC_POSIX_ACL_CONFIG], [ +LB_CHECK_CONFIG_IM([FS_POSIX_ACL], + [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl]) +], [ ]) +]) # LC_POSIX_ACL_CONFIG + +LB_CHECK_CONFIG_IM([CRYPTO_MD5], [], + [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])]) + # # LC_CONFIG_GSS_KEYRING # @@ -3115,6 +3131,7 @@ AC_DEFUN([LC_PROG_LINUX], [ LC_STACK_SIZE LC_QUOTA_CONFIG ]) + LC_POSIX_ACL_CONFIG ]) # LC_PROG_LINUX # diff --git a/lustre/include/lustre_acl.h b/lustre/include/lustre_acl.h index 933d09a..487fb8e 100644 --- a/lustre/include/lustre_acl.h +++ b/lustre/include/lustre_acl.h @@ -37,13 +37,13 @@ #include #include -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL # include # define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD \ (sizeof(posix_acl_xattr_header) + \ LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #ifndef LUSTRE_POSIX_ACL_MAX_SIZE_OLD # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD 0 diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index b8cfb06..0c0b3ba 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -422,8 +423,22 @@ __vfs_setxattr(struct dentry *dentry, struct inode *inode, const char *name, } #endif /* HAVE_VFS_SETXATTR */ +#ifndef HAVE_POSIXACL_USER_NS +/* + * Mask out &init_user_ns so we don't jump + * through hoops to define it somehow only + * to have it ignored anyway. + */ +#define posix_acl_from_xattr(a, b, c) posix_acl_from_xattr(b, c) +#define posix_acl_to_xattr(a, b, c, d) posix_acl_to_xattr(b, c, d) +#endif + +#ifndef HAVE_POSIX_ACL_VALID_USER_NS +#define posix_acl_valid(a,b) posix_acl_valid(b) +#endif + #ifdef HAVE_IOP_SET_ACL -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL #ifndef HAVE_POSIX_ACL_UPDATE_MODE static inline int posix_acl_update_mode(struct inode *inode, umode_t *mode_p, struct posix_acl **acl) diff --git a/lustre/include/lustre_eacl.h b/lustre/include/lustre_eacl.h index 03b9adc..347a8dc 100644 --- a/lustre/include/lustre_eacl.h +++ b/lustre/include/lustre_eacl.h @@ -44,9 +44,9 @@ * @{ */ -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL # include -# include +# include typedef struct { __u16 e_tag; @@ -87,7 +87,7 @@ extern int lustre_posix_acl_create_masq(posix_acl_xattr_entry *entry, extern int lustre_posix_acl_equiv_mode(posix_acl_xattr_entry *entry, mode_t *mode_p, int count); #endif /* HAVE_SERVER_SUPPORT */ -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ /** @} eacl */ diff --git a/lustre/include/lustre_mdc.h b/lustre/include/lustre_mdc.h index ac7b0d5..8c76386 100644 --- a/lustre/include/lustre_mdc.h +++ b/lustre/include/lustre_mdc.h @@ -46,9 +46,9 @@ #include #include -#ifdef CONFIG_FS_POSIX_ACL -# include -#endif /* CONFIG_FS_POSIX_ACL */ +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL +# include +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #include #include #include diff --git a/lustre/include/obd.h b/lustre/include/obd.h index f4cd024..9cdf306 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -1035,7 +1035,7 @@ struct lustre_md { struct lmv_foreign_md *lfm; }; struct lmv_stripe_md *default_lmv; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL struct posix_acl *posix_acl; #endif }; diff --git a/lustre/llite/file.c b/lustre/llite/file.c index cd7d1f6..d288209 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -4850,7 +4850,7 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type) } #ifdef HAVE_IOP_SET_ACL -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type) { struct ll_sb_info *sbi = ll_i2sbi(inode); @@ -4906,7 +4906,7 @@ out: set_cached_acl(inode, type, acl); RETURN(rc); } -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #endif /* HAVE_IOP_SET_ACL */ int ll_inode_permission(struct inode *inode, int mask) diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 7e4ac79..f27043c 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -916,11 +916,11 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat); int ll_getattr_dentry(struct dentry *de, struct kstat *stat); struct posix_acl *ll_get_acl(struct inode *inode, int type); #ifdef HAVE_IOP_SET_ACL -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type); -#else /* !CONFIG_FS_POSIX_ACL */ +#else /* !CONFIG_LUSTRE_FS_POSIX_ACL */ #define ll_set_acl NULL -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #endif int ll_migrate(struct inode *parent, struct file *file, diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index b29d215..cda72aa 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -263,7 +263,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, if (sbi->ll_flags & LL_SBI_LRU_RESIZE) data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; #endif -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL data->ocd_connect_flags |= OBD_CONNECT_ACL | OBD_CONNECT_UMASK | OBD_CONNECT_LARGE_ACL; #endif @@ -598,7 +598,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ptlrpc_req_finished(request); if (IS_ERR(root)) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (lmd.posix_acl) { posix_acl_release(lmd.posix_acl); lmd.posix_acl = NULL; @@ -1619,7 +1619,7 @@ void ll_clear_inode(struct inode *inode) ll_xattr_cache_destroy(inode); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL forget_all_cached_acls(inode); if (lli->lli_posix_acl) { posix_acl_release(lli->lli_posix_acl); @@ -2067,7 +2067,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) return rc; } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (body->mbo_valid & OBD_MD_FLACL) { spin_lock(&lli->lli_lock); if (lli->lli_posix_acl) @@ -2552,7 +2552,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, sbi->ll_flags & LL_SBI_32BIT_API), &md); if (IS_ERR(*inode)) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (md.posix_acl) { posix_acl_release(md.posix_acl); md.posix_acl = NULL; diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 52ca216..50e98a1 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -439,7 +439,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, if (test_xattr_is_selinux_disabled(handler, name)) RETURN(-EOPNOTSUPP); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* posix acl is under protection of LOOKUP lock. when calling to this, * we just have path resolution to the target inode, so we have great * chance that cached ACL is uptodate. @@ -846,7 +846,7 @@ const struct xattr_handler *ll_xattr_handlers[] = { &ll_user_xattr_handler, &ll_trusted_xattr_handler, &ll_security_xattr_handler, -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL &ll_acl_access_xattr_handler, &ll_acl_default_xattr_handler, #endif diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 5480111..e08bf89 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -501,7 +501,7 @@ out: return rc; } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md) { struct req_capsule *pill = &req->rq_pill; @@ -650,7 +650,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, rc = mdc_unpack_acl(req, md); if (rc) GOTO(out, rc); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL } else { md->posix_acl = NULL; #endif @@ -660,7 +660,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, EXIT; out: if (rc) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL posix_acl_release(md->posix_acl); #endif } diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 7e71f4c..a8e4b60 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -2117,7 +2117,7 @@ static int mdd_declare_create_object(const struct lu_env *env, if (rc) GOTO(out, rc); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (def_acl_buf && def_acl_buf->lb_len > 0 && S_ISDIR(attr->la_mode)) { /* if dir, then can inherit default ACl */ rc = mdo_declare_xattr_set(env, c, def_acl_buf, @@ -2360,7 +2360,7 @@ static int mdd_create_object(const struct lu_env *env, struct mdd_object *pobj, GOTO(err_destroy, rc); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (def_acl_buf != NULL && def_acl_buf->lb_len > 0 && S_ISDIR(attr->la_mode)) { /* set default acl */ diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 364474c..22355ab 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -605,7 +605,7 @@ int mdd_attr_set_internal(const struct lu_env *env, struct mdd_object *obj, ENTRY; rc = mdo_attr_set(env, obj, attr, handle); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (!rc && (attr->la_valid & LA_MODE) && needacl) rc = mdd_acl_chmod(env, obj, attr->la_mode, handle); #endif @@ -1069,7 +1069,7 @@ static int mdd_declare_attr_set(const struct lu_env *env, if (rc) return rc; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (attr->la_valid & LA_MODE) { mdd_read_lock(env, obj, DT_TGT_CHILD); rc = mdo_xattr_get(env, obj, &LU_BUF_NULL, diff --git a/lustre/mdd/mdd_permission.c b/lustre/mdd/mdd_permission.c index 5d00907..2b03de1 100644 --- a/lustre/mdd/mdd_permission.c +++ b/lustre/mdd/mdd_permission.c @@ -45,7 +45,7 @@ #include #include "mdd_internal.h" -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* * Hold write_lock for o. @@ -207,7 +207,7 @@ int __mdd_fix_mode_acl(const struct lu_env *env, struct lu_buf *buf, static int mdd_check_acl(const struct lu_env *env, struct mdd_object *obj, const struct lu_attr *la, int mask) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL struct lu_ucred *uc = lu_ucred_assert(env); posix_acl_xattr_header *head; posix_acl_xattr_entry *entry; diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index f8cc796..520609c 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -555,7 +555,7 @@ int mdt_pack_size2body(struct mdt_thread_info *info, RETURN(0); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* * Pack ACL data into the reply. UIDs/GIDs are mapped and filtered by nodemap. * @@ -1117,7 +1117,7 @@ int mdt_attr_get_complex(struct mdt_thread_info *info, GOTO(out, rc = rc2); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (need & MA_ACL_DEF && S_ISDIR(mode)) { buf->lb_buf = ma->ma_acl; buf->lb_len = ma->ma_acl_size; @@ -1351,7 +1351,7 @@ static int mdt_getattr_internal(struct mdt_thread_info *info, repbody->mbo_max_mdsize); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if ((exp_connect_flags(req->rq_export) & OBD_CONNECT_ACL) && (reqbody->mbo_valid & OBD_MD_FLACL)) { struct lu_nodemap *nodemap = nodemap_get_from_exp(exp); diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index e81c671..c3900a9 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -836,7 +836,7 @@ int mdt_close_unpack(struct mdt_thread_info *info); int mdt_reint_unpack(struct mdt_thread_info *info, __u32 op); void mdt_fix_lov_magic(struct mdt_thread_info *info, void *eadata); int mdt_reint_rec(struct mdt_thread_info *, struct mdt_lock_handle *); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL int mdt_pack_acl2body(struct mdt_thread_info *info, struct mdt_body *repbody, struct mdt_object *o, struct lu_nodemap *nodemap); #endif diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index d79cc19..624d4b1 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -563,7 +563,7 @@ static int mdt_finish_open(struct mdt_thread_info *info, RETURN(-ENOENT); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (exp_connect_flags(exp) & OBD_CONNECT_ACL) { struct lu_nodemap *nodemap = nodemap_get_from_exp(exp); if (IS_ERR(nodemap)) diff --git a/lustre/obdclass/acl.c b/lustre/obdclass/acl.c index 599946f..c62cb20 100644 --- a/lustre/obdclass/acl.c +++ b/lustre/obdclass/acl.c @@ -46,7 +46,7 @@ # include #endif /* HAVE_SERVER_SUPPORT */ -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL static inline void lustre_posix_acl_le_to_cpu(posix_acl_xattr_entry *d, posix_acl_xattr_entry *s) diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 1743b51..ed6fd8c 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -1537,7 +1537,7 @@ static int echo_attr_get_complex(const struct lu_env *env, } } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if ((ma->ma_need & MA_ACL_DEF) && S_ISDIR(mode)) { buf->lb_buf = ma->ma_acl; buf->lb_len = ma->ma_acl_size; diff --git a/lustre/ptlrpc/wirehdr.c b/lustre/ptlrpc/wirehdr.c index 7f9fb09..e24d835 100644 --- a/lustre/ptlrpc/wirehdr.c +++ b/lustre/ptlrpc/wirehdr.c @@ -32,10 +32,10 @@ #define DEBUG_SUBSYSTEM S_RPC -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL # include # include -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #include #include diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 87b1407..1d3f174 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -32,10 +32,10 @@ #define DEBUG_SUBSYSTEM S_RPC -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL # include # include -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #include #include @@ -4628,7 +4628,7 @@ void lustre_assert_wire_constants(void) CLASSERT(FIEMAP_EXTENT_NO_DIRECT == 0x40000000); CLASSERT(FIEMAP_EXTENT_NET == 0x80000000); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* Checks for type posix_acl_xattr_entry */ LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, "found %lld\n", (long long)(int)sizeof(posix_acl_xattr_entry)); @@ -4644,9 +4644,9 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(posix_acl_xattr_entry, e_id)); LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_id) == 4, "found %lld\n", (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_id)); -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* Checks for type posix_acl_xattr_header */ LASSERTF((int)sizeof(posix_acl_xattr_header) == 4, "found %lld\n", (long long)(int)sizeof(posix_acl_xattr_header)); @@ -4660,7 +4660,7 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, "found %lld\n", (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries)); #endif /* HAVE_STRUCT_POSIX_ACL_XATTR */ -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ /* Checks for struct link_ea_header */ LASSERTF((int)sizeof(struct link_ea_header) == 24, "found %lld\n", -- 1.8.3.1