Skip to contentSkip to conversation

BUG_ON() Conversion in fs/coda/

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

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

PATCH 1/12 BUG_ON() Conversion in fs/coda/

hi,

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

fs/coda/cache.c renamed from fs/coda/cache.c.orig +1 -1
@@ -51,7 +51,7 @@ void coda_cache_clear_all(struct super_b
         struct coda_sb_info *sbi;
 
         sbi = coda_sbp(sb);
-        if (!sbi) BUG();
+	BUG_ON(!sbi);
 
 	atomic_inc(&permission_epoch);
 }
fs/coda/cnode.c renamed from fs/coda/cnode.c.orig +1 -2
@@ -120,8 +120,7 @@ void coda_replace_fid(struct inode *inod
 	
 	cii = ITOC(inode);
 
-	if (!coda_fideq(&cii->c_fid, oldfid))
-		BUG();
+	BUG_ON(!coda_fideq(&cii->c_fid, oldfid));
 
 	/* replace fid and rehash inode */
 	/* XXX we probably need to hold some lock here! */

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