+/*
+ * 2.6.33 API change,
+ * The xattr_hander->get() callback was changed to take a dentry
+ * instead of an inode, and a handler_flags argument was added.
+ */
+#ifdef HAVE_DENTRY_XATTR_GET
+#define ZPL_XATTR_GET_WRAPPER(fn) \
+static int \
+fn(struct dentry *dentry, const char *name, void *buffer, size_t size, \
+ int unused_handler_flags) \
+{ \
+ return __ ## fn(dentry->d_inode, name, buffer, size); \
+}
+#else
+#define ZPL_XATTR_GET_WRAPPER(fn) \
+static int \
+fn(struct inode *ip, const char *name, void *buffer, size_t size) \
+{ \
+ return __ ## fn(ip, name, buffer, size); \
+}
+#endif /* HAVE_DENTRY_XATTR_GET */
+
+/*
+ * 2.6.33 API change,
+ * The xattr_hander->set() callback was changed to take a dentry
+ * instead of an inode, and a handler_flags argument was added.
+ */
+#ifdef HAVE_DENTRY_XATTR_SET
+#define ZPL_XATTR_SET_WRAPPER(fn) \
+static int \
+fn(struct dentry *dentry, const char *name, const void *buffer, \
+ size_t size, int flags, int unused_handler_flags) \
+{ \
+ return __ ## fn(dentry->d_inode, name, buffer, size, flags); \
+}
+#else
+#define ZPL_XATTR_SET_WRAPPER(fn) \
+static int \
+fn(struct inode *ip, const char *name, const void *buffer, \
+ size_t size, int flags) \
+{ \
+ return __ ## fn(ip, name, buffer, size, flags); \
+}
+#endif /* HAVE_DENTRY_XATTR_SET */
+