ext4: fix inode dirty check in case of fast commits
In case of fast commits, determine if the inode is dirty by checking if the inode is on fast commit list. This also helps us get rid of ext4_inode_info.i_fc_committed_subtid field. Reported-by: Andrea Righi <andrea.righi@canonical.com> Tested-by: Andrea Righi <andrea.righi@canonical.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com> Link: https://lore.kernel.org/r/20201106035911.1942128-18-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
a3114fe747
commit
1ceecb537f
@@ -152,7 +152,6 @@ void ext4_fc_init_inode(struct inode *inode)
|
||||
INIT_LIST_HEAD(&ei->i_fc_list);
|
||||
init_waitqueue_head(&ei->i_fc_wait);
|
||||
atomic_set(&ei->i_fc_updates, 0);
|
||||
ei->i_fc_committed_subtid = 0;
|
||||
}
|
||||
|
||||
/* This function must be called with sbi->s_fc_lock held. */
|
||||
@@ -1037,8 +1036,6 @@ static int ext4_fc_perform_commit(journal_t *journal)
|
||||
if (ret)
|
||||
goto out;
|
||||
spin_lock(&sbi->s_fc_lock);
|
||||
EXT4_I(inode)->i_fc_committed_subtid =
|
||||
atomic_read(&sbi->s_fc_subtid);
|
||||
}
|
||||
spin_unlock(&sbi->s_fc_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user