From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:25:12 +0000 (+0200) Subject: BUG_ON() Conversion in mm/swap_state.c X-Git-Tag: v2.6.17-rc1~10^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e74ca2b49b8a38e9ba0bc039a00498c21140f1d6;p=linux-2.6-omap-h63xx.git BUG_ON() Conversion in mm/swap_state.c this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- diff --git a/mm/swap_state.c b/mm/swap_state.c index d7af296833f..e0e1583f32c 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -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();