summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.vnet.ibm.com>2018-08-22 07:05:00 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2018-08-22 07:05:00 +0000
commitf0cab1396acf7b6a8f43078d5c1062182844a00a (patch)
tree11bcb6b4d3a9478d75f6e7eaa6e1807e545fa214
parentd0aff1c53e11e95ba9073f8180bdde3b4e33ca22 (diff)
mm/util: add kernel-doc for kvfree
Link: http://lkml.kernel.org/r/1532626360-16650-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/util.c b/mm/util.c
index 6809014cf4c8..d2890a407332 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -434,6 +434,13 @@ 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
+ *
+ * If the memory is allocated from vmalloc area it is freed with vfree().
+ * Otherwise kfree() is used.
+ */
void kvfree(const void *addr)
{
if (is_vmalloc_addr(addr))