Skip to content

Commit

Permalink
BUG_ON() Conversion in mm/swap_state.c
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 <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Mar 31, 2006
1 parent 46a350e commit e74ca2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/swap_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ int add_to_swap(struct page * page, gfp_t gfp_mask)
swp_entry_t entry;
int err;

if (!PageLocked(page))
BUG();
BUG_ON(!PageLocked(page));

for (;;) {
entry = get_swap_page();
Expand Down

0 comments on commit e74ca2b

Please sign in to comment.