Skip to content

Commit

Permalink
fs/affs/file.c: replace if/BUG by BUG_ON
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Feb 17, 2015
1 parent 08fe100 commit afe305d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/affs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
ext_key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension);
if (ext < AFFS_I(inode)->i_extcnt)
goto read_ext;
if (ext > AFFS_I(inode)->i_extcnt)
BUG();
BUG_ON(ext > AFFS_I(inode)->i_extcnt);
bh = affs_alloc_extblock(inode, bh, ext);
if (IS_ERR(bh))
return bh;
Expand All @@ -198,8 +197,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
struct buffer_head *prev_bh;

/* allocate a new extended block */
if (ext > AFFS_I(inode)->i_extcnt)
BUG();
BUG_ON(ext > AFFS_I(inode)->i_extcnt);

/* get previous extended block */
prev_bh = affs_get_extblock(inode, ext - 1);
Expand Down

0 comments on commit afe305d

Please sign in to comment.