Skip to contentSkip to conversation

BUG_ON() Conversion in fs/direct-io.c

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

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

PATCH 4/8 BUG_ON() Conversion in fs/direct-io.c

hi,

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

fs/direct-io.c renamed from fs/direct-io.c.orig +1 -2
@@ -915,8 +915,7 @@ do_holes:
 			block_in_page += this_chunk_blocks;
 			dio->blocks_available -= this_chunk_blocks;
 next_block:
-			if (dio->block_in_file > dio->final_block_in_request)
-				BUG();
+			BUG_ON(dio->block_in_file > dio->final_block_in_request);
 			if (dio->block_in_file == dio->final_block_in_request)
 				break;
 		}

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