Skip to content

Commit

Permalink
mm: shmem: use signed int for version handling in casefold option
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
NaRaK-AK47 authored and akpm00 committed Jan 14, 2025
1 parent 217e836 commit 2df6d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4368,7 +4368,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter *
bool latest_version)
{
struct shmem_options *ctx = fc->fs_private;
unsigned int version = UTF8_LATEST;
int version = UTF8_LATEST;
struct unicode_map *encoding;
char *version_str = param->string + 5;

Expand Down

0 comments on commit 2df6d11

Please sign in to comment.