Skip to content

Commit

Permalink
BUG_ON() Conversion in block/elevator.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 <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Mar 24, 2006
1 parent c5d3237 commit ce52449
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,7 @@ void elv_unregister_queue(struct request_queue *q)
int elv_register(struct elevator_type *e)
{
spin_lock_irq(&elv_list_lock);
if (elevator_find(e->elevator_name))
BUG();
BUG_ON(elevator_find(e->elevator_name));
list_add_tail(&e->list, &elv_list);
spin_unlock_irq(&elv_list_lock);

Expand Down

0 comments on commit ce52449

Please sign in to comment.