From c5d3237c2424c4a3cf69d33abc1f229943468367 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Fri, 24 Mar 2006 18:42:13 +0100 Subject: [PATCH] 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 Signed-off-by: Adrian Bunk --- fs/coda/cache.c | 2 +- fs/coda/cnode.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/coda/cache.c b/fs/coda/cache.c index c607d923350..5d052713326 100644 --- a/fs/coda/cache.c +++ b/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); } diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 23aeef5aa81..4c9fecbfa91 100644 --- a/fs/coda/cnode.c +++ b/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! */ -- 2.20.1