Skip to content

Commit

Permalink
BUG_ON() Conversion in fs/udf/
Browse files Browse the repository at this point in the history
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Apr 2, 2006
1 parent d6735bf commit 2c2111c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,10 @@ static int udf_get_block(struct inode *inode, sector_t block, struct buffer_head
err = 0;

bh = inode_getblk(inode, block, &err, &phys, &new);
if (bh)
BUG();
BUG_ON(bh);
if (err)
goto abort;
if (!phys)
BUG();
BUG_ON(!phys);

if (new)
set_buffer_new(bh_result);
Expand Down

0 comments on commit 2c2111c

Please sign in to comment.