提交 512c15ef 编写于 作者: P Pan Bian 提交者: Theodore Ts'o

ext4: stop inode update before return

The inode update should be stopped before returing the error code.
Signed-off-by: NPan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/20210117085732.93788-1-bianpan2016@163.com
Fixes: 8016e29f ("ext4: fast commit recovery path")
Cc: stable@kernel.org
Reviewed-by: NHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 8210bb29
...@@ -5387,9 +5387,11 @@ int ext4_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, ...@@ -5387,9 +5387,11 @@ int ext4_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
inode->i_gid = attr->ia_gid; inode->i_gid = attr->ia_gid;
error = ext4_mark_inode_dirty(handle, inode); error = ext4_mark_inode_dirty(handle, inode);
ext4_journal_stop(handle); ext4_journal_stop(handle);
if (unlikely(error)) if (unlikely(error)) {
ext4_fc_stop_update(inode);
return error; return error;
} }
}
if (attr->ia_valid & ATTR_SIZE) { if (attr->ia_valid & ATTR_SIZE) {
handle_t *handle; handle_t *handle;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册