[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210322121933.297319814@linuxfoundation.org>
Date: Mon, 22 Mar 2021 13:28:12 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Pan Bian <bianpan2016@....com>,
stable@...nel.org,
Harshad Shirwadkar <harshadshirwadkar@...il.com>,
Theodore Tso <tytso@....edu>
Subject: [PATCH 5.11 109/120] ext4: stop inode update before return
From: Pan Bian <bianpan2016@....com>
commit 512c15ef05d73a04f1aef18a3bc61a8bb516f323 upstream.
The inode update should be stopped before returing the error code.
Signed-off-by: Pan Bian <bianpan2016@....com>
Link: https://lore.kernel.org/r/20210117085732.93788-1-bianpan2016@163.com
Fixes: 8016e29f4362 ("ext4: fast commit recovery path")
Cc: stable@...nel.org
Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@...il.com>
Signed-off-by: Theodore Ts'o <tytso@....edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/ext4/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5389,8 +5389,10 @@ int ext4_setattr(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) {
Powered by blists - more mailing lists