diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
commit | d0b2f91bede3bd5e3d24dd6803e56eee959c1797 (patch) | |
tree | 7fee4ab0509879c373c4f2cbd5b8a5be5b4041ee /fs/exfat | |
parent | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (diff) |
Linux-libre 4.8.2-gnupck-4.8.2-gnu
Diffstat (limited to 'fs/exfat')
-rw-r--r-- | fs/exfat/exfat_super.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/fs/exfat/exfat_super.c b/fs/exfat/exfat_super.c index d770deaf1..7d9b9ab06 100644 --- a/fs/exfat/exfat_super.c +++ b/fs/exfat/exfat_super.c @@ -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; } @@ -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); @@ -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) @@ -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) @@ -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) @@ -2623,4 +2640,4 @@ MODULE_ALIAS_FS("texfat"); #else MODULE_ALIAS_FS("exfat"); #endif -#endif +#endif
\ No newline at end of file |