Quellcode durchsuchen

BUG_ON() Conversion in fs/coda/

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

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Eric Sesterhenn vor 19 Jahren
Ursprung
Commit
c5d3237c24
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 1 1
      fs/coda/cache.c
  2. 1 2
      fs/coda/cnode.c

+ 1 - 1
fs/coda/cache.c

@@ -51,7 +51,7 @@ void coda_cache_clear_all(struct super_block *sb)
         struct coda_sb_info *sbi;
 
         sbi = coda_sbp(sb);
-        if (!sbi) BUG();
+	BUG_ON(!sbi);
 
 	atomic_inc(&permission_epoch);
 }

+ 1 - 2
fs/coda/cnode.c

@@ -120,8 +120,7 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid,
 	
 	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! */