2013-04-12 02:23:23

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] f2fs: fix error return code in f2fs_fill_super()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Introduce by commit c0d39e(f2fs: fix return values from validate superblock)

Signed-off-by: Wei Yongjun <[email protected]>
---
fs/f2fs/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1b16cea..35b13b9 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -534,7 +534,8 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
set_opt(sbi, POSIX_ACL);
#endif
/* parse mount options */
- if (parse_options(sb, sbi, (char *)data))
+ err = parse_options(sb, sbi, (char *)data);
+ if (err)
goto free_sb_buf;

sb->s_maxbytes = max_file_size(le32_to_cpu(raw_super->log_blocksize));


2013-04-12 03:18:21

by Namjae Jeon

[permalink] [raw]
Subject: Re: [PATCH -next] f2fs: fix error return code in f2fs_fill_super()

2013/4/12, Wei Yongjun <[email protected]>:
> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> Introduce by commit c0d39e(f2fs: fix return values from validate
> superblock)
>
> Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Namjae Jeon <[email protected]>

Thanks.