summaryrefslogtreecommitdiffstats
path: root/include/linux/xattr_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/xattr_compat.h')
-rw-r--r--include/linux/xattr_compat.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/xattr_compat.h b/include/linux/xattr_compat.h
index a7371f946..28eff95fa 100644
--- a/include/linux/xattr_compat.h
+++ b/include/linux/xattr_compat.h
@@ -54,6 +54,20 @@ fn(struct dentry *dentry, const char *name, void *buffer, size_t size, \
{ \
return (__ ## fn(dentry->d_inode, name, buffer, size)); \
}
+/*
+ * 4.4 API change,
+ * The xattr_hander->get() callback was changed to take a xattr_handler,
+ * and handler_flags argument was removed and should be accessed by
+ * handler->flags.
+ */
+#elif defined(HAVE_HANDLER_XATTR_GET)
+#define ZPL_XATTR_GET_WRAPPER(fn) \
+static int \
+fn(const struct xattr_handler *handler, struct dentry *dentry, \
+ const char *name, void *buffer, size_t size) \
+{ \
+ return (__ ## fn(dentry->d_inode, name, buffer, size)); \
+}
#else
#define ZPL_XATTR_GET_WRAPPER(fn) \
static int \
@@ -76,6 +90,20 @@ fn(struct dentry *dentry, const char *name, const void *buffer, \
{ \
return (__ ## fn(dentry->d_inode, name, buffer, size, flags)); \
}
+/*
+ * 4.4 API change,
+ * The xattr_hander->set() callback was changed to take a xattr_handler,
+ * and handler_flags argument was removed and should be accessed by
+ * handler->flags.
+ */
+#elif defined(HAVE_HANDLER_XATTR_SET)
+#define ZPL_XATTR_SET_WRAPPER(fn) \
+static int \
+fn(const struct xattr_handler *handler, struct dentry *dentry, \
+ const char *name, const void *buffer, size_t size, int flags) \
+{ \
+ return (__ ## fn(dentry->d_inode, name, buffer, size, flags)); \
+}
#else
#define ZPL_XATTR_SET_WRAPPER(fn) \
static int \