Skip to content

Commit b071cc3

Browse files
NaRaK-AK47akpm00
authored andcommitted
mm: shmem: use signed int for version handling in casefold option
Fixes an issue where the use of an unsigned data type in `shmem_parse_opt_casefold()` caused incorrect evaluation of negative conditions. Link: https://lkml.kernel.org/r/[email protected] Fixes: 58e55ef ("tmpfs: Add casefold lookup support") Reviewed-by: André Almeida <[email protected]> Reviewed-by: Gabriel Krisman Bertazi <[email protected]> Signed-off-by: Karan Sanghavi <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Hugh Dickens <[email protected]> Cc: Shuah khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 05c82ee commit b071cc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4368,7 +4368,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter *
43684368
bool latest_version)
43694369
{
43704370
struct shmem_options *ctx = fc->fs_private;
4371-
unsigned int version = UTF8_LATEST;
4371+
int version = UTF8_LATEST;
43724372
struct unicode_map *encoding;
43734373
char *version_str = param->string + 5;
43744374

0 commit comments

Comments
 (0)