Skip to content
This repository was archived by the owner on Mar 3, 2024. It is now read-only.

Commit ed23452

Browse files
committed
exfat: fix name_hash wrong on big_endian system
Where read path failed on big endian system Signed-off-by: Chen Minqiang <[email protected]>
1 parent 034f47d commit ed23452

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ static int exfat_utf8_to_utf16(struct super_block *sb,
518518
exfat_wstrchr(bad_uni_chars, *uniname))
519519
lossy |= NLS_NAME_LOSSY;
520520

521-
upname[i] = exfat_toupper(sb, *uniname);
521+
upname[i] = cpu_to_le16(exfat_toupper(sb, *uniname));
522522
uniname++;
523523
}
524524

@@ -610,7 +610,7 @@ static int exfat_nls_to_ucs2(struct super_block *sb,
610610
exfat_wstrchr(bad_uni_chars, *uniname))
611611
lossy |= NLS_NAME_LOSSY;
612612

613-
upname[unilen] = exfat_toupper(sb, *uniname);
613+
upname[unilen] = cpu_to_le16(exfat_toupper(sb, *uniname));
614614
uniname++;
615615
unilen++;
616616
}

0 commit comments

Comments
 (0)