From 14a61442c2203d2a49f2f954bfa9259c0ddac1aa Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Tue, 3 Oct 2006 23:36:38 +0200 Subject: BUG_ON conversion for fs/reiserfs This patch converts several if () BUG(); construct to BUG_ON(); which occupies less space, uses unlikely and is safer when BUG() is disabled. S_ISREG() has no side effects, so the conversion is safe. Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- fs/reiserfs/stree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/reiserfs/stree.c') diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index 8b9b13127136..5240abe1a709 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c @@ -1476,9 +1476,7 @@ static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th, int n_block_size = p_s_sb->s_blocksize; int cut_bytes; BUG_ON(!th->t_trans_id); - - if (n_new_file_size != p_s_inode->i_size) - BUG(); + BUG_ON(n_new_file_size != p_s_inode->i_size); /* the page being sent in could be NULL if there was an i/o error ** reading in the last block. The user will hit problems trying to -- cgit v1.2.3