Commit b1deefc9 authored by Guo Chao's avatar Guo Chao Committed by Theodore Ts'o
Browse files

ext4: remove unnecessary NULL pointer check

brelse() and ext4_journal_force_commit() are both inlined and able
to handle NULL.
Signed-off-by: default avatarGuo Chao <>
Reviewed-by: default avatarDarrick J. Wong <>
Signed-off-by: default avatar"Theodore Ts'o" <>
parent 41be871f
......@@ -2110,8 +2110,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
ext4_std_error(dir->i_sb, err);
if (bh)
return err;
......@@ -4480,16 +4480,12 @@ static void ext4_clear_journal_err(struct super_block *sb,
int ext4_force_commit(struct super_block *sb)
journal_t *journal;
int ret = 0;
if (sb->s_flags & MS_RDONLY)
return 0;
journal = EXT4_SB(sb)->s_journal;
if (journal)
ret = ext4_journal_force_commit(journal);
return ret;
return ext4_journal_force_commit(journal);
static int ext4_sync_fs(struct super_block *sb, int wait)
Supports Markdown
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