nick kvfree() from apparmor
too many places open-code it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -104,17 +104,3 @@ void *__aa_kvmalloc(size_t size, gfp_t flags)
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* kvfree - free an allocation do by kvmalloc
|
||||
* @buffer: buffer to free (MAYBE_NULL)
|
||||
*
|
||||
* Free a buffer allocated by kvmalloc
|
||||
*/
|
||||
void kvfree(void *buffer)
|
||||
{
|
||||
if (is_vmalloc_addr(buffer))
|
||||
vfree(buffer);
|
||||
else
|
||||
kfree(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user