From: Eric Sesterhenn Date: Fri, 24 Mar 2006 17:42:13 +0000 (+0100) Subject: BUG_ON() Conversion in fs/coda/ X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5d3237c2424c4a3cf69d33abc1f229943468367;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/fs/coda/cache.c b/fs/coda/cache.c index c607d923350a..5d0527133266 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 23aeef5aa814..4c9fecbfa91f 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! */