]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
jbd: Deletion of an unnecessary check before the function call "iput"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 16 Nov 2014 22:23:19 +0000 (23:23 +0100)
committerJan Kara <jack@suse.cz>
Tue, 18 Nov 2014 09:15:29 +0000 (10:15 +0100)
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 <elfring@users.sourceforge.net>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/jbd/journal.c

index aab8549591e7ad7143e41a9957338cb8f5583fd6..c46a79adb6adf0fe74dec7173f3c1fc7b33e5002 100644 (file)
@@ -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);