summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2021-01-17 00:57:32 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 11:54:17 +0100
commite07f221840cb078dd650dc4c8c65ddaf416971f7 (patch)
tree52b353b57d49bc8f740fcf608c7bd7ac05fbf9bd /fs
parent5f669c9131227fdd86d6b379a78e86332c268fba (diff)
downloadlinux-rt-e07f221840cb078dd650dc4c8c65ddaf416971f7.tar.gz
ext4: stop inode update before return
commit 512c15ef05d73a04f1aef18a3bc61a8bb516f323 upstream. The inode update should be stopped before returing the error code. Signed-off-by: Pan Bian <bianpan2016@163.com> Link: https://lore.kernel.org/r/20210117085732.93788-1-bianpan2016@163.com Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Cc: stable@kernel.org Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c173c8405856..64039bbb656d 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5389,8 +5389,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
inode->i_gid = attr->ia_gid;
error = ext4_mark_inode_dirty(handle, inode);
ext4_journal_stop(handle);
- if (unlikely(error))
+ if (unlikely(error)) {
+ ext4_fc_stop_update(inode);
return error;
+ }
}
if (attr->ia_valid & ATTR_SIZE) {