Skip to content

Commit

Permalink
BUG_ON() Conversion in fs/coda/
Browse files Browse the repository at this point in the history
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Mar 24, 2006
1 parent 88bcd51 commit c5d3237
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/coda/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 1 addition & 2 deletions fs/coda/cnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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! */
Expand Down

0 comments on commit c5d3237

Please sign in to comment.