diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2021-07-16 20:20:22 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-09-04 23:38:18 -0400 |
commit | 55ce2f649b9e88111270333a8127e23f4f8f42d7 (patch) | |
tree | 33af2ceb5eb9b03f539c11d3828930b479ef6e35 /fs/hpfs | |
parent | 4df031ff5876d94b48dd9ee486ba5522382a06b2 (diff) |
ext4: correct the error path of ext4_write_inline_data_end()
Current error path of ext4_write_inline_data_end() is not correct.
Firstly, it should pass out the error value if ext4_get_inode_loc()
return fail, or else it could trigger infinite loop if we inject error
here. And then it's better to add inode to orphan list if it return fail
in ext4_journal_stop(), otherwise we could not restore inline xattr
entry after power failure. Finally, we need to reset the 'ret' value if
ext4_write_inline_data_end() return success in ext4_write_end() and
ext4_journalled_write_end(), otherwise we could not get the error return
value of ext4_journal_stop().
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-3-yi.zhang@huawei.com
Diffstat (limited to 'fs/hpfs')
0 files changed, 0 insertions, 0 deletions