Skip to contentSkip to conversation

BUG_ON() Conversion in fs/smbfs/

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

lore
Share & tools
lore
#0 lore raw

PATCH 8/12 BUG_ON() Conversion in fs/smbfs/

hi,

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

fs/smbfs/file.c renamed from fs/smbfs/file.c.orig +2 -4
@@ -178,11 +178,9 @@ smb_writepage(struct page *page, struct 
 	unsigned offset = PAGE_CACHE_SIZE;
 	int err;
 
-	if (!mapping)
-		BUG();
+	BUG_ON(!mapping);
 	inode = mapping->host;
-	if (!inode)
-		BUG();
+	BUG_ON(!inode);
 
 	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
 

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