Skip to contentSkip to conversation

BUG_ON() Conversion in mm/swap_state.c

PATCH In review Eric Sesterhenn / snakebyte 1 participant 1 message Jan 31, 2006

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

PATCH 6/7 BUG_ON() Conversion in mm/swap_state.c

hi,

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

mm/swap_state.c renamed from mm/swap_state.c.orig +1 -2
@@ -146,8 +146,7 @@ int add_to_swap(struct page * page, gfp_
 	swp_entry_t entry;
 	int err;
 
-	if (!PageLocked(page))
-		BUG();
+	BUG_ON(!PageLocked(page));
 
 	for (;;) {
 		entry = get_swap_page();

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