Skip to content

Commit

Permalink
jbd: Deletion of an unnecessary check before the function call "iput"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Elfring authored and Jan Kara committed Nov 18, 2014
1 parent 75cbe70 commit 11cc9f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 11cc9f5

Please sign in to comment.