mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
mm/slob: Use free_page instead of put_page for page-size kmalloc allocations
When freeing objects, the slob allocator currently free empty pages
calling __free_pages(). However, page-size kmallocs are disposed
using put_page() instead.
It makes no sense to call put_page() for kernel pages that are provided
by the object allocator, so we shouldn't be doing this ourselves.
This is based on:
commit d9b7f22623
Author: Glauber Costa <[email protected]>
slub: use free_page instead of put_page for freeing kmalloc allocation
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Matt Mackall <[email protected]>
Acked-by: Glauber Costa <[email protected]>
Signed-off-by: Ezequiel Garcia <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
242860a47a
commit
8cf9864b13
1 changed files with 1 additions and 1 deletions
|
|
@ -500,7 +500,7 @@ void kfree(const void *block)
|
|||
unsigned int *m = (unsigned int *)(block - align);
|
||||
slob_free(m, *m + align);
|
||||
} else
|
||||
put_page(sp);
|
||||
__free_pages(sp, compound_order(sp));
|
||||
}
|
||||
EXPORT_SYMBOL(kfree);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue