staging/lustre: fix build error when CONFIG_FS_POSIX_ACL is off

We need to include <linux/posix_acl_xattr.h> 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);
<many similar errors omitted>

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peng Tao 2013-12-03 22:11:38 +08:00 committed by Greg Kroah-Hartman
parent b89f3b9460
commit 04eb2b7f3f
4 changed files with 15 additions and 19 deletions

View file

@ -47,17 +47,17 @@
#error Shoud not include direectly. use #include <lustre_acl.h> instead #error Shoud not include direectly. use #include <lustre_acl.h> instead
#endif #endif
# include <linux/fs.h> #include <linux/fs.h>
# include <linux/dcache.h> #include <linux/dcache.h>
# ifdef CONFIG_FS_POSIX_ACL
# include <linux/posix_acl_xattr.h> #include <linux/posix_acl_xattr.h>
# define LUSTRE_POSIX_ACL_MAX_ENTRIES 32 #define LUSTRE_POSIX_ACL_MAX_ENTRIES 32
# define LUSTRE_POSIX_ACL_MAX_SIZE \ #define LUSTRE_POSIX_ACL_MAX_SIZE \
(sizeof(posix_acl_xattr_header) + \ (sizeof(posix_acl_xattr_header) + \
LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry))
# endif /* CONFIG_FS_POSIX_ACL */
# include <linux/lustre_intent.h> #include <linux/lustre_intent.h>
# include <linux/xattr.h> /* XATTR_{REPLACE,CREATE} */ #include <linux/xattr.h> /* XATTR_{REPLACE,CREATE} */
#ifndef LUSTRE_POSIX_ACL_MAX_SIZE #ifndef LUSTRE_POSIX_ACL_MAX_SIZE
# define LUSTRE_POSIX_ACL_MAX_SIZE 0 # define LUSTRE_POSIX_ACL_MAX_SIZE 0

View file

@ -48,12 +48,9 @@
* @{ * @{
*/ */
# include <linux/fs.h> #include <linux/fs.h>
# include <linux/dcache.h> #include <linux/dcache.h>
# ifdef CONFIG_FS_POSIX_ACL #include <linux/lustre_intent.h>
# include <linux/posix_acl_xattr.h>
# endif /* CONFIG_FS_POSIX_ACL */
# include <linux/lustre_intent.h>
#include <lustre_handles.h> #include <lustre_handles.h>
#include <linux/libcfs/libcfs.h> #include <linux/libcfs/libcfs.h>
#include <obd_class.h> #include <obd_class.h>

View file

@ -47,6 +47,7 @@
#include <lustre_mdc.h> #include <lustre_mdc.h>
#include <linux/lustre_intent.h> #include <linux/lustre_intent.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/posix_acl_xattr.h>
#ifndef FMODE_EXEC #ifndef FMODE_EXEC
#define FMODE_EXEC 0 #define FMODE_EXEC 0

View file

@ -36,10 +36,8 @@
#define DEBUG_SUBSYSTEM S_RPC #define DEBUG_SUBSYSTEM S_RPC
# ifdef CONFIG_FS_POSIX_ACL #include <linux/fs.h>
# include <linux/fs.h> #include <linux/posix_acl_xattr.h>
# include <linux/posix_acl_xattr.h>
# endif
#include <obd_support.h> #include <obd_support.h>
#include <obd_class.h> #include <obd_class.h>