diff options
author | Pan Bian <bianpan2016@163.com> | 2021-01-17 00:57:32 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-03-21 00:42:12 -0400 |
commit | 512c15ef05d73a04f1aef18a3bc61a8bb516f323 (patch) | |
tree | a07486905a2312bb0d0ba14019c01989a5d0780c /fs | |
parent | 8210bb29c1b66200cff7b25febcf6e39baf49fbf (diff) | |
download | linux-512c15ef05d73a04f1aef18a3bc61a8bb516f323.tar.bz2 |
ext4: stop inode update before return
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 927e47db7f00..0948a43f1b3d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5387,8 +5387,10 @@ int ext4_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, 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) { |