From 04eb2b7f3ff19685531945a484e78ab7b9376ccc Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Tue, 3 Dec 2013 22:11:38 +0800 Subject: [PATCH] staging/lustre: fix build error when CONFIG_FS_POSIX_ACL is off We need to include regardless of CONFIG_FS_POSIX_ACL is set or not. Otherwise build fails as reported by kbuild robot: >> drivers/staging/lustre/lustre/llite/file.c:2965:2: error: implicit declaration of function 'posix_acl_dup' [-Werror=implicit-function-declaration] acl = posix_acl_dup(lli->lli_posix_acl); Reported-by: Fengguang Wu Cc: Andreas Dilger Signed-off-by: Peng Tao Signed-off-by: Greg Kroah-Hartman --- .../lustre/lustre/include/linux/lustre_acl.h | 18 +++++++++--------- .../staging/lustre/lustre/include/lustre_mdc.h | 9 +++------ .../lustre/lustre/llite/llite_internal.h | 1 + .../staging/lustre/lustre/ptlrpc/wiretest.c | 6 ++---- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_acl.h b/drivers/staging/lustre/lustre/include/linux/lustre_acl.h index ff4fc4ff2894..778b123ce31e 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_acl.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_acl.h @@ -47,17 +47,17 @@ #error Shoud not include direectly. use #include instead #endif -# include -# include -# ifdef CONFIG_FS_POSIX_ACL -# include -# define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 -# define LUSTRE_POSIX_ACL_MAX_SIZE \ +#include +#include + +#include +#define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 +#define LUSTRE_POSIX_ACL_MAX_SIZE \ (sizeof(posix_acl_xattr_header) + \ LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) -# endif /* CONFIG_FS_POSIX_ACL */ -# include -# include /* XATTR_{REPLACE,CREATE} */ + +#include +#include /* XATTR_{REPLACE,CREATE} */ #ifndef LUSTRE_POSIX_ACL_MAX_SIZE # define LUSTRE_POSIX_ACL_MAX_SIZE 0 diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index 19000259a5e4..c1e02702b931 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -48,12 +48,9 @@ * @{ */ -# include -# include -# ifdef CONFIG_FS_POSIX_ACL -# include -# endif /* CONFIG_FS_POSIX_ACL */ -# include +#include +#include +#include #include #include #include diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index c326ff24410c..6d15e5c100fc 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -47,6 +47,7 @@ #include #include #include +#include #ifndef FMODE_EXEC #define FMODE_EXEC 0 diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c index e3f02c77f3b9..6cc0d6e61f12 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c +++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c @@ -36,10 +36,8 @@ #define DEBUG_SUBSYSTEM S_RPC -# ifdef CONFIG_FS_POSIX_ACL -# include -# include -# endif +#include +#include #include #include -- 2.20.1