File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 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)
576576 }
577577 }
578578
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 ;
588582}
589583
590584/*
@@ -991,16 +985,13 @@ static const struct vmballoon_ops vmballoon_batched_ops = {
991985
992986static bool vmballoon_init_batching (struct vmballoon * b )
993987{
994- b -> page = alloc_page (VMW_PAGE_ALLOC_NOSLEEP );
995- if (!b -> page )
996- return false;
988+ struct page * page ;
997989
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 )
1001992 return false;
1002- }
1003993
994+ b -> batch_page = page_address (page );
1004995 return true;
1005996}
1006997
You can’t perform that action at this time.
0 commit comments