Skip to content
Snippets Groups Projects
Commit 00c1c3b0 authored by Yuri.Sh's avatar Yuri.Sh Committed by GitHub
Browse files

Merge pull request #92 from evan-a-a/master

exfat_super.c: Support kernel 4.8
parents e0072d9f 7e3b251d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -349,7 +349,11 @@ static int exfat_d_hash(const struct dentry *dentry, const struct inode *inode,
struct qstr *qstr)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
qstr->hash = full_name_hash(dentry, qstr->name, exfat_striptail_len(qstr));
#else
qstr->hash = full_name_hash(qstr->name, exfat_striptail_len(qstr));
#endif
return 0;
}
 
Loading
Loading
@@ -370,7 +374,11 @@ static int exfat_d_hashi(const struct dentry *dentry, const struct inode *inode,
name = qstr->name;
len = exfat_striptail_len(qstr);
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
hash = init_name_hash(dentry);
#else
hash = init_name_hash();
#endif
while (len--)
hash = partial_name_hash(nls_upper(sb, *name++), hash);
qstr->hash = end_name_hash(hash);
Loading
Loading
@@ -378,7 +386,10 @@ static int exfat_d_hashi(const struct dentry *dentry, const struct inode *inode,
return 0;
}
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
static int exfat_cmpi(const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
static int exfat_cmpi(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
Loading
Loading
@@ -389,7 +400,11 @@ static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode,
unsigned int len, const char *str, const struct qstr *name)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
struct nls_table *t = EXFAT_SB(dentry->d_sb)->nls_io;
#else
struct nls_table *t = EXFAT_SB(parent->d_sb)->nls_io;
#endif
unsigned int alen, blen;
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
Loading
Loading
@@ -416,8 +431,10 @@ static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode,
}
return 1;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
static int exfat_cmp(const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
static int exfat_cmp(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment