summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-06-16 18:50:56 +0200
committerTheodore Ts'o <tytso@mit.edu>2023-07-29 18:37:53 -0400
commit889860e452d7436ca72018b8a03cbd89c38d6384 (patch)
tree2061244433053afbcd87ca8d712fc1d665cd34ee /fs/ext4/super.c
parentf1128084b40e520bea8bb32b3ff4d03745ab7e64 (diff)
downloadlinux-889860e452d7436ca72018b8a03cbd89c38d6384.tar.gz
linux-889860e452d7436ca72018b8a03cbd89c38d6384.tar.bz2
linux-889860e452d7436ca72018b8a03cbd89c38d6384.zip
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: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230616165109.21695-10-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a9a7c38c7442..4613264344b0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -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)