Whamcloud - gitweb
LU-5560 llite: basic support of SELinux in CLIO
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index 4402683..627edf8 100644 (file)
@@ -387,4 +387,20 @@ static inline void truncate_inode_pages_final(struct address_space *map)
 #define SIZE_MAX       (~(size_t)0)
 #endif
 
+#ifdef HAVE_SECURITY_IINITSEC_CALLBACK
+# define ll_security_inode_init_security(inode, dir, name, value, len, \
+                                        initxattrs, dentry)           \
+        security_inode_init_security(inode, dir, &((dentry)->d_name), \
+                                     initxattrs, dentry)
+#elif defined HAVE_SECURITY_IINITSEC_QSTR
+# define ll_security_inode_init_security(inode, dir, name, value, len, \
+                                        initxattrs, dentry)           \
+        security_inode_init_security(inode, dir, &((dentry)->d_name), \
+                                     name, value, len)
+#else /* !HAVE_SECURITY_IINITSEC_CALLBACK && !HAVE_SECURITY_IINITSEC_QSTR */
+# define ll_security_inode_init_security(inode, dir, name, value, len, \
+                                        initxattrs, dentry)           \
+        security_inode_init_security(inode, dir, name, value, len)
+#endif
+
 #endif /* _LUSTRE_COMPAT_H */