aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/super.c
diff options
context:
space:
mode:
authorZhao Hongjiang <zhaohongjiang@huawei.com>2012-10-09 01:44:36 -0400
committerJan Kara <jack@suse.cz>2012-10-09 17:23:53 -0400
commitae2cf4284e198684cad8f654923dd8062ee46f88 (patch)
tree6afb80cfd16eb6f1166289ee5e8411aa14c66cda /fs/ext2/super.c
parentc3d59ad6ab0b3d01c10f326bbc9b089424a3a5c4 (diff)
ext2: fix return values on parse_options() failure
parse_options() in ext2 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>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r--fs/ext2/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 6c205d0c565b..fa04d023177e 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -469,7 +469,7 @@ static int parse_options(char *options, struct super_block *sb)
469 uid = make_kuid(current_user_ns(), option); 469 uid = make_kuid(current_user_ns(), option);
470 if (!uid_valid(uid)) { 470 if (!uid_valid(uid)) {
471 ext2_msg(sb, KERN_ERR, "Invalid uid value %d", option); 471 ext2_msg(sb, KERN_ERR, "Invalid uid value %d", option);
472 return -1; 472 return 0;
473 473
474 } 474 }
475 sbi->s_resuid = uid; 475 sbi->s_resuid = uid;
@@ -480,7 +480,7 @@ static int parse_options(char *options, struct super_block *sb)
480 gid = make_kgid(current_user_ns(), option); 480 gid = make_kgid(current_user_ns(), option);
481 if (!gid_valid(gid)) { 481 if (!gid_valid(gid)) {
482 ext2_msg(sb, KERN_ERR, "Invalid gid value %d", option); 482 ext2_msg(sb, KERN_ERR, "Invalid gid value %d", option);
483 return -1; 483 return 0;
484 } 484 }
485 sbi->s_resgid = gid; 485 sbi->s_resgid = gid;
486 break; 486 break;