Commit 04b8e946 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7ab660f8
...@@ -435,11 +435,14 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) ...@@ -435,11 +435,14 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)
EXPORT_SYMBOL(kvmalloc_node); EXPORT_SYMBOL(kvmalloc_node);
/** /**
* kvfree - free memory allocated with kvmalloc * kvfree() - Free memory.
* @addr: pointer returned by kvmalloc * @addr: Pointer to allocated memory.
* *
* If the memory is allocated from vmalloc area it is freed with vfree(). * kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().
* Otherwise kfree() is used. * 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) void kvfree(const void *addr)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment