From b1deefc99e668348f7c785c6ece5f6ff4c6d8b5c Mon Sep 17 00:00:00 2001 From: Guo Chao Date: Mon, 28 Jan 2013 21:41:02 -0500 Subject: 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 Reviewed-by: Darrick J. Wong Signed-off-by: "Theodore Ts'o" --- fs/ext4/super.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs/ext4/super.c') diff --git a/fs/ext4/super.c b/fs/ext4/super.c index dc0fb7b942cf..aac52738eb60 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -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) -- cgit v1.2.3