aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-02-17 16:46:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-17 17:34:52 -0500
commitafe305dcc96edc06aec923a0f5fa07ff654b2489 (patch)
tree69b83fc784e50051d79700c7fc6c767e68002030 /fs
parent08fe100d91bc09baca9eb22206f6b050286bd43c (diff)
fs/affs/file.c: replace if/BUG by BUG_ON
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/affs/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c
index 40a024a9b41d..7e83ba22bed4 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -180,8 +180,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
180 ext_key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension); 180 ext_key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension);
181 if (ext < AFFS_I(inode)->i_extcnt) 181 if (ext < AFFS_I(inode)->i_extcnt)
182 goto read_ext; 182 goto read_ext;
183 if (ext > AFFS_I(inode)->i_extcnt) 183 BUG_ON(ext > AFFS_I(inode)->i_extcnt);
184 BUG();
185 bh = affs_alloc_extblock(inode, bh, ext); 184 bh = affs_alloc_extblock(inode, bh, ext);
186 if (IS_ERR(bh)) 185 if (IS_ERR(bh))
187 return bh; 186 return bh;
@@ -198,8 +197,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
198 struct buffer_head *prev_bh; 197 struct buffer_head *prev_bh;
199 198
200 /* allocate a new extended block */ 199 /* allocate a new extended block */
201 if (ext > AFFS_I(inode)->i_extcnt) 200 BUG_ON(ext > AFFS_I(inode)->i_extcnt);
202 BUG();
203 201
204 /* get previous extended block */ 202 /* get previous extended block */
205 prev_bh = affs_get_extblock(inode, ext - 1); 203 prev_bh = affs_get_extblock(inode, ext - 1);