From: Markus Elfring Date: Sun, 16 Nov 2014 22:23:19 +0000 (+0100) Subject: jbd: Deletion of an unnecessary check before the function call "iput" X-Git-Tag: v3.19-rc1~138^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=11cc9f56a18d371634d07b1be7e8772f6f7dcec5;p=karo-tx-linux.git jbd: Deletion of an unnecessary check before the function call "iput" The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jan Kara --- diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index aab8549591e7..c46a79adb6ad 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -1373,8 +1373,7 @@ int journal_destroy(journal_t *journal) } mutex_unlock(&journal->j_checkpoint_mutex); - if (journal->j_inode) - iput(journal->j_inode); + iput(journal->j_inode); if (journal->j_revoke) journal_destroy_revoke(journal); kfree(journal->j_wbuf);