From: Alex Zhuravlev Date: Thu, 1 Jun 2017 07:20:12 +0000 (+0400) Subject: LU-9578 llite: use security context if it's enabled in the kernel X-Git-Tag: 2.10.55~33 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=61f26ea47f96632a90702f2b404e845a01498612 LU-9578 llite: use security context if it's enabled in the kernel if it's disabled, then Lustre stop to work properly (can not create files, etc) Change-Id: I1e431ec95a2b0613b43893567eb6d1a64ec832de Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/27364 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Chris Horn Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 1c61400..423e960 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -258,7 +258,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, if (sbi->ll_flags & LL_SBI_ALWAYS_PING) data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS; -#ifdef HAVE_SECURITY_DENTRY_INIT_SECURITY +#if defined(HAVE_SECURITY_DENTRY_INIT_SECURITY) && defined(CONFIG_SECURITY) data->ocd_connect_flags2 |= OBD_CONNECT2_FILE_SECCTX; #endif /* HAVE_SECURITY_DENTRY_INIT_SECURITY */