Skip to content

Commit

Permalink
s390/mm: use VM_BUG_ON in crst_table_[upgrade|downgrade]
Browse files Browse the repository at this point in the history
The BUG_ON in crst_table_[upgrade|downgrade] is a debugging aid,
replace it with VM_BUG_ON.

Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Martin Schwidefsky committed Sep 6, 2017
1 parent e7d0c41 commit 2fc4876
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/s390/mm/pgalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long end)
int rc, notify;

/* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */
BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
if (end >= TASK_SIZE_MAX)
return -ENOMEM;
rc = 0;
Expand Down Expand Up @@ -124,7 +124,7 @@ void crst_table_downgrade(struct mm_struct *mm)
pgd_t *pgd;

/* downgrade should only happen from 3 to 2 levels (compat only) */
BUG_ON(mm->context.asce_limit != _REGION2_SIZE);
VM_BUG_ON(mm->context.asce_limit != _REGION2_SIZE);

if (current->active_mm == mm) {
clear_user_asce();
Expand Down

0 comments on commit 2fc4876

Please sign in to comment.