From 7af958a556ef2be0219ba279631b05a7b2a58cee Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Mon, 11 Jul 2016 20:40:27 -0400 Subject: [PATCH 1/1] LU-8056 llite: POSIX_ACL_XATTR_{ACCESS,DEFAULT} removed in 4.5 POSIX_ACL_XATTR_{ACCESS,DEFAULT} are duplicate xattr name definitions and they are replaced by XATTR_NAME_POSIX_ACL_{ACCESS,DEFAULT} since Linux kernel 4.5 Linux-commit:97d79299223baab330b194437e676d301f12d5f6 Signed-off-by: Li Dongyang Change-Id: I9e031d3ac77a4bf1832d932c1cab7032e4572445 Reviewed-on: http://review.whamcloud.com/20225 Reviewed-by: Fan Yong Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/llite/xattr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 282fe80..461a0ba 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -57,6 +57,14 @@ #define XATTR_NAME_EVM "security.evm" #endif +#ifndef XATTR_NAME_POSIX_ACL_ACCESS +# define XATTR_NAME_POSIX_ACL_ACCESS POSIX_ACL_XATTR_ACCESS +#endif + +#ifndef XATTR_NAME_POSIX_ACL_DEFAULT +# define XATTR_NAME_POSIX_ACL_DEFAULT POSIX_ACL_XATTR_DEFAULT +#endif + #define XATTR_USER_T (1) #define XATTR_TRUSTED_T (2) #define XATTR_SECURITY_T (3) @@ -68,10 +76,10 @@ static int get_xattr_type(const char *name) { - if (!strcmp(name, POSIX_ACL_XATTR_ACCESS)) + if (!strcmp(name, XATTR_NAME_POSIX_ACL_ACCESS)) return XATTR_ACL_ACCESS_T; - if (!strcmp(name, POSIX_ACL_XATTR_DEFAULT)) + if (!strcmp(name, XATTR_NAME_POSIX_ACL_DEFAULT)) return XATTR_ACL_DEFAULT_T; if (!strncmp(name, XATTR_USER_PREFIX, -- 1.8.3.1