]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mm/damon: document damon_call_control->dealloc_on_cancel repeat behavior
authorSeongJae Park <sj@kernel.org>
Sat, 17 Jan 2026 17:52:52 +0000 (09:52 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 31 Jan 2026 22:22:46 +0000 (14:22 -0800)
damon_call_control->dealloc_on_cancel works only when ->repeat is true.
But the behavior is not clearly documented.  DAMON API callers can
understand the behavior only after reading kdamond_call() code.  Document
the behavior on the kernel-doc comment of damon_call_control.

Link: https://lkml.kernel.org/r/20260117175256.82826-6-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/damon.h

index bd4c76b126bd2741115a5241d1ebd226494b040c..bdca28e15e4017b17ead79aeaaebbba084be207c 100644 (file)
@@ -663,7 +663,7 @@ struct damon_operations {
  * @data:              Data that will be passed to @fn.
  * @repeat:            Repeat invocations.
  * @return_code:       Return code from @fn invocation.
- * @dealloc_on_cancel: De-allocate when canceled.
+ * @dealloc_on_cancel: If @repeat is true, de-allocate when canceled.
  *
  * Control damon_call(), which requests specific kdamond to invoke a given
  * function.  Refer to damon_call() for more details.