mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
commit
d4005926fb
3 changed files with 24 additions and 4 deletions
|
|
@ -11,7 +11,7 @@
|
|||
#include <linux/ratelimit.h>
|
||||
#include <linux/nls.h>
|
||||
|
||||
#define EXFAT_VERSION "5.10.1"
|
||||
#define EXFAT_VERSION "5.11.1"
|
||||
|
||||
#define EXFAT_SUPER_MAGIC 0x2011BAB0UL
|
||||
#define EXFAT_ROOT_INO 1
|
||||
|
|
|
|||
4
file.c
4
file.c
|
|
@ -244,7 +244,11 @@ void exfat_truncate(struct inode *inode, loff_t size)
|
|||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
struct exfat_sb_info *sbi = EXFAT_SB(sb);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
||||
unsigned int blocksize = i_blocksize(inode);
|
||||
#else
|
||||
unsigned int blocksize = 1 << inode->i_blkbits;
|
||||
#endif
|
||||
loff_t aligned_size;
|
||||
int err;
|
||||
|
||||
|
|
|
|||
22
nls.c
22
nls.c
|
|
@ -3,9 +3,13 @@
|
|||
* Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
|
||||
#include <linux/vmalloc.h>
|
||||
#endif
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "exfat_raw.h"
|
||||
|
|
@ -659,7 +663,11 @@ static int exfat_load_upcase_table(struct super_block *sb,
|
|||
unsigned char skip = false;
|
||||
unsigned short *upcase_table;
|
||||
|
||||
upcase_table = kcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
|
||||
#else
|
||||
upcase_table = vzalloc(UTBL_COUNT * sizeof(unsigned short));
|
||||
#endif
|
||||
if (!upcase_table)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -715,7 +723,11 @@ static int exfat_load_default_upcase_table(struct super_block *sb)
|
|||
unsigned short uni = 0, *upcase_table;
|
||||
unsigned int index = 0;
|
||||
|
||||
upcase_table = kcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
|
||||
#else
|
||||
upcase_table = vzalloc(UTBL_COUNT * sizeof(unsigned short));
|
||||
#endif
|
||||
if (!upcase_table)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -803,5 +815,9 @@ load_default:
|
|||
|
||||
void exfat_free_upcase_table(struct exfat_sb_info *sbi)
|
||||
{
|
||||
kfree(sbi->vol_utbl);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
kvfree(sbi->vol_utbl);
|
||||
#else
|
||||
vfree(sbi->vol_utbl);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue