mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 4.7 compat: handler->get() takes both dentry and inode
Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4665
This commit is contained in:
committed by
Brian Behlendorf
parent
278f223668
commit
fd4c7b7a73
@@ -101,13 +101,26 @@ fn(struct inode *ip, char *list, size_t list_size, \
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 4.7 API change,
|
||||
* The xattr_handler->get() callback was changed to take a both dentry and
|
||||
* inode, because the dentry might not be attached to an inode yet.
|
||||
*/
|
||||
#if defined(HAVE_XATTR_GET_DENTRY_INODE)
|
||||
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
||||
static int \
|
||||
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
||||
struct inode *inode, const char *name, void *buffer, size_t size) \
|
||||
{ \
|
||||
return (__ ## fn(inode, name, buffer, size)); \
|
||||
}
|
||||
/*
|
||||
* 4.4 API change,
|
||||
* The xattr_handler->get() callback was changed to take a xattr_handler,
|
||||
* and handler_flags argument was removed and should be accessed by
|
||||
* handler->flags.
|
||||
*/
|
||||
#if defined(HAVE_XATTR_GET_HANDLER)
|
||||
#elif defined(HAVE_XATTR_GET_HANDLER)
|
||||
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
||||
static int \
|
||||
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
||||
|
||||
Reference in New Issue
Block a user