diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-09-23 11:42:18 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-09-30 16:39:47 +0200 |
commit | a3a956c78efaa202b1d75190136671cf6e87bfbe (patch) | |
tree | 25c4675e1c2f118d3bfa89a3495ecf9335594895 /fs/ntfs3/upcase.c | |
parent | fs/ntfs3: Change destroy_inode to free_inode (diff) | |
download | linux-a3a956c78efaa202b1d75190136671cf6e87bfbe.tar.xz linux-a3a956c78efaa202b1d75190136671cf6e87bfbe.zip |
fs/ntfs3: Add option "nocase"
This commit adds mount option and additional functions.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/upcase.c')
-rw-r--r-- | fs/ntfs3/upcase.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ntfs3/upcase.c b/fs/ntfs3/upcase.c index b5e8256fd710..7681eefacb4b 100644 --- a/fs/ntfs3/upcase.c +++ b/fs/ntfs3/upcase.c @@ -102,3 +102,15 @@ case_insentive: diff2 = l1 - l2; return diff2 ? diff2 : diff1; } + +/* Helper function for ntfs_d_hash. */ +unsigned long ntfs_names_hash(const u16 *name, size_t len, const u16 *upcase, + unsigned long hash) +{ + while (len--) { + unsigned int c = upcase_unicode_char(upcase, *name++); + hash = partial_name_hash(c, hash); + } + + return hash; +} |