diff options
| author | Jason Yan <[email protected]> | 2022-10-25 04:02:06 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2022-11-06 05:07:59 +0000 |
| commit | 9f2a1d9fb33a2129a9ba29bc61d3f14adb28ddc2 (patch) | |
| tree | fa4ba763c6f9cd464feaad2381fd93c916b3919e /fs/ext4/fast_commit.c | |
| parent | ext4: fix warning in 'ext4_da_release_space' (diff) | |
| download | kernel-9f2a1d9fb33a2129a9ba29bc61d3f14adb28ddc2.tar.gz kernel-9f2a1d9fb33a2129a9ba29bc61d3f14adb28ddc2.zip | |
ext4: fix wrong return err in ext4_load_and_init_journal()
The return value is wrong in ext4_load_and_init_journal(). The local
variable 'err' need to be initialized before goto out. The original code
in __ext4_fill_super() is fine because it has two return values 'ret'
and 'err' and 'ret' is initialized as -EINVAL. After we factor out
ext4_load_and_init_journal(), this code is broken. So fix it by directly
returning -EINVAL in the error handler path.
Cc: [email protected]
Fixes: 9c1dd22d7422 ("ext4: factor out ext4_load_and_init_journal()")
Signed-off-by: Jason Yan <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
0 files changed, 0 insertions, 0 deletions
