Skip to contentSkip to conversation

BUG_ON() Conversion in fs/udf/

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Jan 27, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 11/12 BUG_ON() Conversion in fs/udf/

hi,

this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.

fs/udf/inode.c renamed from fs/udf/inode.c.orig +2 -4
@@ -312,12 +312,10 @@ static int udf_get_block(struct inode *i
 	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);

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors