Skip to content

Commit

Permalink
BUG_ON() Conversion in fs/direct-io.c
Browse files Browse the repository at this point in the history
this changes if() BUG(); constructs to BUG_ON() which is
cleaner 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 31, 2006
1 parent 9e77c48 commit d4569d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,7 @@ static int do_direct_IO(struct dio *dio)
block_in_page += this_chunk_blocks;
dio->blocks_available -= this_chunk_blocks;
next_block:
if (dio->block_in_file > dio->final_block_in_request)
BUG();
BUG_ON(dio->block_in_file > dio->final_block_in_request);
if (dio->block_in_file == dio->final_block_in_request)
break;
}
Expand Down

0 comments on commit d4569d2

Please sign in to comment.