Skip to content

Commit

Permalink
ocfs2: remove bogus test from ocfs2_read_locked_inode()
Browse files Browse the repository at this point in the history
'args' are always set for ocfs2_read_locked_inode() and brelse() checks
whether bh is NULL.  So the test (args && bh) is unnecessary (plus the
args part is really confusing anyway).  Remove it.

Coverity id: 1128856.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Dec 11, 2014
1 parent 2b69300 commit 4a635a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ocfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ static int ocfs2_read_locked_inode(struct inode *inode,
if (status < 0)
make_bad_inode(inode);

if (args && bh)
brelse(bh);
brelse(bh);

return status;
}
Expand Down

0 comments on commit 4a635a1

Please sign in to comment.