Skip to content

Commit 7c37587

Browse files
jankaratytso
authored andcommitted
ext4: Drop special handling of journalled data from ext4_quota_on()
Now that ext4_writepages() makes sure all journalled data is committed and checkpointed, sync_filesystem() call done by dquot_quota_on() is enough for quota IO to see uptodate data. So drop special handling of journalled data from ext4_quota_on(). Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230329154950.19720-10-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 56c2a0e commit 7c37587

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

fs/ext4/super.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6881,23 +6881,6 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
68816881
sb_dqopt(sb)->flags &= ~DQUOT_NOLIST_DIRTY;
68826882
}
68836883

6884-
/*
6885-
* When we journal data on quota file, we have to flush journal to see
6886-
* all updates to the file when we bypass pagecache...
6887-
*/
6888-
if (EXT4_SB(sb)->s_journal &&
6889-
ext4_should_journal_data(d_inode(path->dentry))) {
6890-
/*
6891-
* We don't need to lock updates but journal_flush() could
6892-
* otherwise be livelocked...
6893-
*/
6894-
jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
6895-
err = jbd2_journal_flush(EXT4_SB(sb)->s_journal, 0);
6896-
jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
6897-
if (err)
6898-
return err;
6899-
}
6900-
69016884
lockdep_set_quota_inode(path->dentry->d_inode, I_DATA_SEM_QUOTA);
69026885
err = dquot_quota_on(sb, type, format_id, path);
69036886
if (!err) {

0 commit comments

Comments
 (0)