diff options
| author | Harshad Shirwadkar <[email protected]> | 2020-11-06 03:59:06 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2020-11-07 04:01:05 +0000 |
| commit | 1ceecb537f72734e4315638e7a1bb62e56c86fbf (patch) | |
| tree | 94188b67ff85fc29ab9f69989fccd98e5bf36d90 /fs/ext4/inode.c | |
| parent | ext4: remove unnecessary fast commit calls from ext4_file_mmap (diff) | |
| download | kernel-1ceecb537f72734e4315638e7a1bb62e56c86fbf.tar.gz kernel-1ceecb537f72734e4315638e7a1bb62e56c86fbf.zip | |
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 <[email protected]>
Tested-by: Andrea Righi <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Harshad Shirwadkar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/inode.c')
| -rw-r--r-- | fs/ext4/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 87120c4c44f3..000bf70e88ed 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -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; } |
