summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2024-09-13 10:15:56 +0200
committerVlastimil Babka <vbabka@suse.cz>2024-09-13 11:05:01 +0200
commit4b7ff9ab98af11a477d50f08382bcc4c2f899926 (patch)
treeb77f38a4cc15d1cee818c8d8d6a0661bd14dca7e /mm
parentio_uring: port to struct kmem_cache_args (diff)
downloadlinux-4b7ff9ab98af11a477d50f08382bcc4c2f899926.tar.xz
linux-4b7ff9ab98af11a477d50f08382bcc4c2f899926.zip
mm, slab: restore kerneldoc for kmem_cache_create()
As kmem_cache_create() became a _Generic() wrapper macro, it currently has no kerneldoc despite being the main API to use. Add it. Also adjust kmem_cache_create_usercopy() kerneldoc to indicate it is now a legacy wrapper. Also expand the kerneldoc for struct kmem_cache_args, especially for the freeptr_offset field, where important details were removed with the removal of kmem_cache_create_rcu(). Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab_common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 30000dcf0736..86c2e6f4a1ce 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -239,13 +239,17 @@ out:
}
/**
- * __kmem_cache_create_args - Create a kmem cache
+ * __kmem_cache_create_args - Create a kmem cache.
* @name: A string which is used in /proc/slabinfo to identify this cache.
* @object_size: The size of objects to be created in this cache.
- * @args: Arguments for the cache creation (see struct kmem_cache_args).
+ * @args: Additional arguments for the cache creation (see
+ * &struct kmem_cache_args).
* @flags: See %SLAB_* flags for an explanation of individual @flags.
*
- * Cannot be called within a interrupt, but can be interrupted.
+ * Not to be called directly, use the kmem_cache_create() wrapper with the same
+ * parameters.
+ *
+ * Context: Cannot be called within a interrupt, but can be interrupted.
*
* Return: a pointer to the cache on success, NULL on failure.
*/