mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
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 <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
parent
46a350ef98
commit
e74ca2b49b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user