This patch fixes a bug in ext4_fc_track_inode() where we should not immediately return from ext4_fc_track_inode() if the inode is on fast commit list. It is possible that the inode is on fast commit list and then somebody calls ext4_fc_track_inode(). If we immediately return if the inode is on fc list, we will let the caller modify the inode while it is being committed. Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> --- fs/ext4/fast_commit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 608ae16afcd6..0307e21e5b29 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -611,8 +611,7 @@ void ext4_fc_track_inode(handle_t *handle, struct inode *inode) if (!test_opt2(inode->i_sb, JOURNAL_FAST_COMMIT) || (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) || - ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE) || - !list_empty(&ei->i_fc_list)) + ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE)) return; while (ext4_test_inode_state(inode, EXT4_STATE_FC_COMMITTING)) { -- 2.37.0.170.g444d1eabd0-goog