mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
nick kvfree() from apparmor
too many places open-code it Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
50c6e282bd
commit
39f1f78d53
4 changed files with 12 additions and 15 deletions
10
mm/util.c
10
mm/util.c
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/swapops.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
|
@ -387,6 +388,15 @@ unsigned long vm_mmap(struct file *file, unsigned long addr,
|
|||
}
|
||||
EXPORT_SYMBOL(vm_mmap);
|
||||
|
||||
void kvfree(const void *addr)
|
||||
{
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
EXPORT_SYMBOL(kvfree);
|
||||
|
||||
struct address_space *page_mapping(struct page *page)
|
||||
{
|
||||
struct address_space *mapping = page->mapping;
|
||||
|
|
|
|||
Loading…
Reference in a new issue