#include <linux/fs_struct.h>
#include <linux/namei.h>
#include <linux/pagemap.h>
+#include <linux/posix_acl_xattr.h>
#include <linux/bio.h>
#include <linux/xattr.h>
#include <linux/workqueue.h>
#include <linux/slab.h>
#include <libcfs/linux/linux-fs.h>
-#include <lustre_patchless_compat.h>
#include <obd_support.h>
#define current_ngroups current_cred()->group_info->ngroups
}
#endif
+#ifndef HAVE_FOP_ITERATE_SHARED
+#define iterate_shared iterate
+#endif
+
#ifdef HAVE_DIRTY_INODE_HAS_FLAG
# define ll_dirty_inode(inode, flag) (inode)->i_sb->s_op->dirty_inode((inode), flag)
#else
}
#endif /* HAVE_VFS_SETXATTR */
+#ifndef HAVE_POSIXACL_USER_NS
+/*
+ * Mask out &init_user_ns so we don't jump
+ * through hoops to define it somehow only
+ * to have it ignored anyway.
+ */
+#define posix_acl_from_xattr(a, b, c) posix_acl_from_xattr(b, c)
+#define posix_acl_to_xattr(a, b, c, d) posix_acl_to_xattr(b, c, d)
+#endif
+
+#ifndef HAVE_POSIX_ACL_VALID_USER_NS
+#define posix_acl_valid(a,b) posix_acl_valid(b)
+#endif
+
#ifdef HAVE_IOP_SET_ACL
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
#ifndef HAVE_POSIX_ACL_UPDATE_MODE
static inline int posix_acl_update_mode(struct inode *inode, umode_t *mode_p,
struct posix_acl **acl)
#define ll_pagevec_init(pvec, n) pagevec_init(pvec, n)
#endif
+#ifdef HAVE_D_COUNT
+# define ll_d_count(d) d_count(d)
+#else
+# define ll_d_count(d) ((d)->d_count)
+#endif /* HAVE_D_COUNT */
+
+#ifndef HAVE_IN_COMPAT_SYSCALL
+#define in_compat_syscall is_compat_task
+#endif
+
#ifdef HAVE_I_PAGES
#define page_tree i_pages
#else
#define i_pages tree_lock
-#define xa_lock_irq(lockp) spin_lock_irq(lockp)
-#define xa_unlock_irq(lockp) spin_unlock_irq(lockp)
+#endif
+
+#ifndef xa_lock_irqsave
+#define xa_lock_irqsave(lockp, flags) spin_lock_irqsave(lockp, flags)
+#define xa_unlock_irqrestore(lockp, flags) spin_unlock_irqrestore(lockp, flags)
+#endif
+
+#ifndef HAVE_LOCK_PAGE_MEMCG
+#define lock_page_memcg(page) do {} while (0)
+#define unlock_page_memcg(page) do {} while (0)
#endif
#ifndef KMEM_CACHE_USERCOPY
kmem_cache_create(name, size, align, flags, ctor)
#endif
+#ifndef HAVE_LINUX_SELINUX_IS_ENABLED
+#define selinux_is_enabled() 1
+#endif
+
#endif /* _LUSTRE_COMPAT_H */