Commit 889860e4 authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o

ext4: drop read-only check from ext4_force_commit()

JBD2 code will quickly return without doing anything when there's
nothing to commit so there's no point in the read-only check in
ext4_force_commit(). Just drop it.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230616165109.21695-10-jack@suse.czSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent f1128084
......@@ -6270,13 +6270,7 @@ static int ext4_clear_journal_err(struct super_block *sb,
*/
int ext4_force_commit(struct super_block *sb)
{
journal_t *journal;
if (sb_rdonly(sb))
return 0;
journal = EXT4_SB(sb)->s_journal;
return ext4_journal_force_commit(journal);
return ext4_journal_force_commit(EXT4_SB(sb)->s_journal);
}
static int ext4_sync_fs(struct super_block *sb, int wait)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment