File tree 1 file changed +7
-16
lines changed
1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -576,15 +576,9 @@ static void vmballoon_pop(struct vmballoon *b)
576
576
}
577
577
}
578
578
579
- if (b -> batch_page ) {
580
- vunmap (b -> batch_page );
581
- b -> batch_page = NULL ;
582
- }
583
-
584
- if (b -> page ) {
585
- __free_page (b -> page );
586
- b -> page = NULL ;
587
- }
579
+ /* Clearing the batch_page unconditionally has no adverse effect */
580
+ free_page ((unsigned long )b -> batch_page );
581
+ b -> batch_page = NULL ;
588
582
}
589
583
590
584
/*
@@ -991,16 +985,13 @@ static const struct vmballoon_ops vmballoon_batched_ops = {
991
985
992
986
static bool vmballoon_init_batching (struct vmballoon * b )
993
987
{
994
- b -> page = alloc_page (VMW_PAGE_ALLOC_NOSLEEP );
995
- if (!b -> page )
996
- return false;
988
+ struct page * page ;
997
989
998
- b -> batch_page = vmap (& b -> page , 1 , VM_MAP , PAGE_KERNEL );
999
- if (!b -> batch_page ) {
1000
- __free_page (b -> page );
990
+ page = alloc_page (GFP_KERNEL | __GFP_ZERO );
991
+ if (!page )
1001
992
return false;
1002
- }
1003
993
994
+ b -> batch_page = page_address (page );
1004
995
return true;
1005
996
}
1006
997
You can’t perform that action at this time.
0 commit comments