Whamcloud - gitweb
LU-9679 lustre: remove some "#ifdef CONFIG*" from .c files.
[fs/lustre-release.git] / lustre / include / obd.h
index 66218c5..c0d70c6 100644 (file)
@@ -33,6 +33,8 @@
 #ifndef __OBD_H
 #define __OBD_H
 
+#include <linux/fs.h>
+#include <linux/posix_acl.h>
 #include <linux/kobject.h>
 #include <linux/spinlock.h>
 #include <linux/sysfs.h>
@@ -1061,6 +1063,25 @@ struct lustre_md {
 #endif
 };
 
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
+static inline void lmd_clear_acl(struct lustre_md *md)
+{
+       if (md->posix_acl) {
+               posix_acl_release(md->posix_acl);
+               md->posix_acl = NULL;
+       }
+}
+
+#define OBD_CONNECT_ACL_FLAGS  \
+       (OBD_CONNECT_ACL | OBD_CONNECT_UMASK | OBD_CONNECT_LARGE_ACL)
+#else
+static inline void lmd_clear_acl(struct lustre_md *md)
+{
+}
+
+#define OBD_CONNECT_ACL_FLAGS  (0)
+#endif
+
 struct md_open_data {
        struct obd_client_handle        *mod_och;
        struct ptlrpc_request           *mod_open_req;