Skip to contentSkip to conversation

BUG_ON() Conversion in kernel/fork.c

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

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

PATCH 2/6 BUG_ON() Conversion in kernel/fork.c

hi,

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

kernel/fork.c renamed from kernel/fork.c.orig +1 -2
@@ -726,8 +726,7 @@ int unshare_files(void)
 	struct files_struct *files  = current->files;
 	int rc;
 
-	if(!files)
-		BUG();
+	BUG_ON(!files);
 
 	/* This can race but the race causes us to copy when we don't
 	   need to and drop the copy */

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