[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176762846621.510.17459515291167261011.tip-bot2@tip-bot2>
Date: Mon, 05 Jan 2026 15:54:26 -0000
From: "tip-bot2 for Marco Elver" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marco Elver <elver@...gle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Bart Van Assche <bvanassche@....org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: locking/core] debugfs: Make debugfs_cancellation a context lock struct
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 6e530e2e31191d88f692e6c8d3bd245e43416e4f
Gitweb: https://git.kernel.org/tip/6e530e2e31191d88f692e6c8d3bd245e43416e4f
Author: Marco Elver <elver@...gle.com>
AuthorDate: Fri, 19 Dec 2025 16:40:10 +01:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 05 Jan 2026 16:43:32 +01:00
debugfs: Make debugfs_cancellation a context lock struct
When compiling include/linux/debugfs.h with CONTEXT_ANALYSIS enabled, we
can see this error:
./include/linux/debugfs.h:239:17: error: use of undeclared identifier 'cancellation'
239 | void __acquires(cancellation)
Move the __acquires(..) attribute after the declaration, so that the
compiler can see the cancellation function argument, as well as making
struct debugfs_cancellation a real context lock to benefit from Clang's
context analysis.
This change is a preparatory change to allow enabling context analysis
in subsystems that include the above header.
Signed-off-by: Marco Elver <elver@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Bart Van Assche <bvanassche@....org>
Link: https://patch.msgid.link/20251219154418.3592607-22-elver@google.com
---
include/linux/debugfs.h | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 7cecda2..4177c47 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -239,18 +239,16 @@ ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf,
* @cancel: callback to call
* @cancel_data: extra data for the callback to call
*/
-struct debugfs_cancellation {
+context_lock_struct(debugfs_cancellation) {
struct list_head list;
void (*cancel)(struct dentry *, void *);
void *cancel_data;
};
-void __acquires(cancellation)
-debugfs_enter_cancellation(struct file *file,
- struct debugfs_cancellation *cancellation);
-void __releases(cancellation)
-debugfs_leave_cancellation(struct file *file,
- struct debugfs_cancellation *cancellation);
+void debugfs_enter_cancellation(struct file *file,
+ struct debugfs_cancellation *cancellation) __acquires(cancellation);
+void debugfs_leave_cancellation(struct file *file,
+ struct debugfs_cancellation *cancellation) __releases(cancellation);
#else
Powered by blists - more mailing lists