diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-23 00:15:31 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-23 00:15:31 +0300 |
commit | e9e541ecfee39745da042ff5194b0813bb4c3f9c (patch) | |
tree | 2cfe0cf93dd54daebd9b728bcdd5aa99ecc85301 /fs | |
parent | e14fd4ba8fb47fcf5f244366ec01ae94490cd86a (diff) | |
parent | 9eb78c25327548b905598975aa3ded4ef244b94a (diff) | |
download | linux-e9e541ecfee39745da042ff5194b0813bb4c3f9c.tar.xz |
Merge tag 'exfat-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat
Pull exfat update from Namjae Jeon:
"Avoid page allocation failure from upcase table allocation"
* tag 'exfat-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
exfat: Avoid allocating upcase table using kcalloc()
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exfat/nls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c index 675d0e7058c5..314d5407a1be 100644 --- a/fs/exfat/nls.c +++ b/fs/exfat/nls.c @@ -659,7 +659,7 @@ 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); + upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL); if (!upcase_table) return -ENOMEM; @@ -715,7 +715,7 @@ 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); + upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL); if (!upcase_table) return -ENOMEM; @@ -803,5 +803,5 @@ load_default: void exfat_free_upcase_table(struct exfat_sb_info *sbi) { - kfree(sbi->vol_utbl); + kvfree(sbi->vol_utbl); } |