1
0
Fork 0

mm/util.c: improve kvfree() kerneldoc

Scooped from an email from Matthew.

Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Andrew Morton 2018-09-04 15:45:55 -07:00 committed by Linus Torvalds
parent 7ab660f8ba
commit 04b8e94607
1 changed files with 7 additions and 4 deletions

View File

@ -435,11 +435,14 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)
EXPORT_SYMBOL(kvmalloc_node);
/**
* kvfree - free memory allocated with kvmalloc
* @addr: pointer returned by kvmalloc
* kvfree() - Free memory.
* @addr: Pointer to allocated memory.
*
* If the memory is allocated from vmalloc area it is freed with vfree().
* Otherwise kfree() is used.
* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().
* It is slightly more efficient to use kfree() or vfree() if you are certain
* that you know which one to use.
*
* Context: Any context except NMI.
*/
void kvfree(const void *addr)
{