Commit 512c15ef authored by Pan Bian's avatar Pan Bian Committed by Theodore Ts'o

ext4: stop inode update before return

The inode update should be stopped before returing the error code.
Signed-off-by: default avatarPan 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: default avatarHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment