Skip to content

Commit 66415f6

Browse files
Zhao Hongjiangjankara
authored andcommitted
ext3: fix return values on parse_options() failure
parse_options() in ext3 should return 0 when parse the mount options fails. Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Reviewed-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent ae2cf42 commit 66415f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/ext3/super.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static int parse_options (char *options, struct super_block *sb,
10011001
uid = make_kuid(current_user_ns(), option);
10021002
if (!uid_valid(uid)) {
10031003
ext3_msg(sb, KERN_ERR, "Invalid uid value %d", option);
1004-
return -1;
1004+
return 0;
10051005

10061006
}
10071007
sbi->s_resuid = uid;
@@ -1012,7 +1012,7 @@ static int parse_options (char *options, struct super_block *sb,
10121012
gid = make_kgid(current_user_ns(), option);
10131013
if (!gid_valid(gid)) {
10141014
ext3_msg(sb, KERN_ERR, "Invalid gid value %d", option);
1015-
return -1;
1015+
return 0;
10161016
}
10171017
sbi->s_resgid = gid;
10181018
break;

0 commit comments

Comments
 (0)