From 7dea23d35031bf52551b45efdec952bca34aafba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torstein=20Huseb=C3=B8?= Date: Tue, 1 Apr 2014 14:21:47 +0200 Subject: [PATCH] Since kernel version 3.10 d_hash and d_compare do not need inode to be passed as a argument --- exfat_super.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/exfat_super.c b/exfat_super.c index 1038580..c912b76 100644 --- a/exfat_super.c +++ b/exfat_super.c @@ -336,15 +336,23 @@ static unsigned int exfat_striptail_len(const struct qstr *qstr) return __exfat_striptail_len(qstr->len, qstr->name); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int exfat_d_hash(const struct dentry *dentry, struct qstr *qstr) +#else static int exfat_d_hash(const struct dentry *dentry, const struct inode *inode, struct qstr *qstr) +#endif { qstr->hash = full_name_hash(qstr->name, exfat_striptail_len(qstr)); return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int exfat_d_hashi(const struct dentry *dentry, struct qstr *qstr) +#else static int exfat_d_hashi(const struct dentry *dentry, const struct inode *inode, struct qstr *qstr) +#endif { struct nls_table *t = EXFAT_SB(dentry->d_sb)->nls_io; const unsigned char *name; @@ -362,9 +370,14 @@ static int exfat_d_hashi(const struct dentry *dentry, const struct inode *inode, return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int exfat_cmpi(const struct dentry *parent, const struct dentry *dentry, + unsigned int len, const char *str, const struct qstr *name) +#else static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode, - const struct dentry *dentry, const struct inode *inode, - unsigned int len, const char *str, const struct qstr *name) + const struct dentry *dentry, const struct inode *inode, + unsigned int len, const char *str, const struct qstr *name) +#endif { struct nls_table *t = EXFAT_SB(parent->d_sb)->nls_io; unsigned int alen, blen; @@ -378,9 +391,14 @@ static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode, return 1; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int exfat_cmp(const struct dentry *parent, const struct dentry *dentry, + unsigned int len, const char *str, const struct qstr *name) +#else static int exfat_cmp(const struct dentry *parent, const struct inode *pinode, - const struct dentry *dentry, const struct inode *inode, - unsigned int len, const char *str, const struct qstr *name) + const struct dentry *dentry, const struct inode *inode, + unsigned int len, const char *str, const struct qstr *name) +#endif { unsigned int alen, blen;