We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faeec8e commit a2e740eCopy full SHA for a2e740e
mm/vmalloc.c
@@ -3374,15 +3374,17 @@ void vfree(const void *addr)
3374
struct page *page = vm->pages[i];
3375
3376
BUG_ON(!page);
3377
- mod_memcg_page_state(page, MEMCG_VMALLOC, -1);
+ if (!(vm->flags & VM_MAP_PUT_PAGES))
3378
+ mod_memcg_page_state(page, MEMCG_VMALLOC, -1);
3379
/*
3380
* High-order allocs for huge vmallocs are split, so
3381
* can be freed as an array of order-0 allocations
3382
*/
3383
__free_page(page);
3384
cond_resched();
3385
}
- atomic_long_sub(vm->nr_pages, &nr_vmalloc_pages);
3386
3387
+ atomic_long_sub(vm->nr_pages, &nr_vmalloc_pages);
3388
kvfree(vm->pages);
3389
kfree(vm);
3390
0 commit comments