Ver código fonte

BUG_ON() Conversion in fs/udf/

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>
Eric Sesterhenn 19 anos atrás
pai
commit
2c2111c2bd
1 arquivos alterados com 2 adições e 4 exclusões
  1. 2 4
      fs/udf/inode.c

+ 2 - 4
fs/udf/inode.c

@@ -312,12 +312,10 @@ static int udf_get_block(struct inode *inode, sector_t block, struct buffer_head
 	err = 0;
 	err = 0;
 
 
 	bh = inode_getblk(inode, block, &err, &phys, &new);
 	bh = inode_getblk(inode, block, &err, &phys, &new);
-	if (bh)
-		BUG();
+	BUG_ON(bh);
 	if (err)
 	if (err)
 		goto abort;
 		goto abort;
-	if (!phys)
-		BUG();
+	BUG_ON(!phys);
 
 
 	if (new)
 	if (new)
 		set_buffer_new(bh_result);
 		set_buffer_new(bh_result);