diff mbox series

[11/74] backports: add stubs to handle debugfs cancellation API

Message ID 20240524190906.076a30163546.I33e5bb5a3f12cbf87838ef867681a7ba51beaf46@changeid (mailing list archive)
State New
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:07 p.m. UTC
From: Gregory Greenman <gregory.greenman@intel.com>

It is added in v6.7-rc4, add empty stubs.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/debugfs.h | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/debugfs.h b/backport/backport-include/linux/debugfs.h
index 6020c210f133..cb954ac392a9 100644
--- a/backport/backport-include/linux/debugfs.h
+++ b/backport/backport-include/linux/debugfs.h
@@ -23,4 +23,28 @@  static inline void debugfs_create_xul(const char *name, umode_t mode,
 }
 #endif
 
+#if LINUX_VERSION_IS_LESS(6,7,0)
+/**
+ * struct debugfs_cancellation - cancellation data
+ * @list: internal, for keeping track
+ * @cancel: callback to call
+ * @cancel_data: extra data for the callback to call
+ */
+struct debugfs_cancellation {
+	struct list_head list;
+	void (*cancel)(struct dentry *, void *);
+	void *cancel_data;
+};
+
+static inline void
+debugfs_enter_cancellation(struct file *file,
+			   struct debugfs_cancellation *cancellation)
+{}
+
+static inline void
+debugfs_leave_cancellation(struct file *file,
+			   struct debugfs_cancellation *cancellation)
+{}
+#endif /* < 6.7.0 */
+
 #endif /* __BACKPORT_DEBUGFS_H_ */