mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Linux 4.4 compat: xattr operations takes xattr_handler
The xattr_hander->{list,get,set} were changed to take a xattr_handler,
and handler_flags argument was removed and should be accessed by
handler->flags.
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4021
This commit is contained in:
committed by
Brian Behlendorf
parent
1a09371678
commit
61d482f7cd
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user