Skip to content

Commit

Permalink
mm/util.c: improve kvfree() kerneldoc
Browse files Browse the repository at this point in the history
Scooped from an email from Matthew.

Cc: Mike Rapoport <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Sep 4, 2018
1 parent 7ab660f commit 04b8e94
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mm/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 04b8e94

Please sign in to comment.