From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:25:12 +0000 (+0200) Subject: BUG_ON() Conversion in mm/swap_state.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e74ca2b49b8a38e9ba0bc039a00498c21140f1d6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 d7af296833fc..e0e1583f32c2 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();