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

Johannes Berg <[email protected]> Fri, 24 May 2024 19:07:23 +0200
Newsgroups org.kernel.vger.backports
Message-ID <20240524190906.076a30163546.I33e5bb5a3f12cbf87838ef867681a7ba51beaf46@changeid>
From: Gregory Greenman <[email protected]>

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

Signed-off-by: Gregory Greenman <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
 backport/backport-include/linux/debugfs.h | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)

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_ */
-- 
2.45.1