mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
ext4: remove unnecessary NULL pointer check
brelse() and ext4_journal_force_commit() are both inlined and able to handle NULL. Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
41be871f74
commit
b1deefc99e
2 changed files with 2 additions and 7 deletions
|
@ -2110,8 +2110,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
|
||||||
journal_error:
|
journal_error:
|
||||||
ext4_std_error(dir->i_sb, err);
|
ext4_std_error(dir->i_sb, err);
|
||||||
cleanup:
|
cleanup:
|
||||||
if (bh)
|
brelse(bh);
|
||||||
brelse(bh);
|
|
||||||
dx_release(frames);
|
dx_release(frames);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4480,16 +4480,12 @@ static void ext4_clear_journal_err(struct super_block *sb,
|
||||||
int ext4_force_commit(struct super_block *sb)
|
int ext4_force_commit(struct super_block *sb)
|
||||||
{
|
{
|
||||||
journal_t *journal;
|
journal_t *journal;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (sb->s_flags & MS_RDONLY)
|
if (sb->s_flags & MS_RDONLY)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
journal = EXT4_SB(sb)->s_journal;
|
journal = EXT4_SB(sb)->s_journal;
|
||||||
if (journal)
|
return ext4_journal_force_commit(journal);
|
||||||
ret = ext4_journal_force_commit(journal);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ext4_sync_fs(struct super_block *sb, int wait)
|
static int ext4_sync_fs(struct super_block *sb, int wait)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue