mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
a3114fe747
commit
1ceecb537f
3 changed files with 1 additions and 8 deletions
|
@ -3312,8 +3312,7 @@ static bool ext4_inode_datasync_dirty(struct inode *inode)
|
|||
EXT4_I(inode)->i_datasync_tid))
|
||||
return false;
|
||||
if (test_opt2(inode->i_sb, JOURNAL_FAST_COMMIT))
|
||||
return atomic_read(&EXT4_SB(inode->i_sb)->s_fc_subtid) <
|
||||
EXT4_I(inode)->i_fc_committed_subtid;
|
||||
return !list_empty(&EXT4_I(inode)->i_fc_list);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue