summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-29 14:48:42 +0100
committerSimon Rettberg2023-11-29 14:48:42 +0100
commita28f8f762d89b47db836cdb66a2aa817900f313f (patch)
tree6fdcc85ff153cf6680ff66c0099216e6dd6f91a6
parent[KERNEL] initial support for RHEL Kernel 5.18.x (diff)
downloadxloop-a28f8f762d89b47db836cdb66a2aa817900f313f.tar.gz
xloop-a28f8f762d89b47db836cdb66a2aa817900f313f.tar.xz
xloop-a28f8f762d89b47db836cdb66a2aa817900f313f.zip
Add missing CONFIG_DEBUG_FS checks
-rw-r--r--src/kernel/xloop_main_5.15.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/xloop_main_5.15.c b/src/kernel/xloop_main_5.15.c
index eb181c2..bc869b8 100644
--- a/src/kernel/xloop_main_5.15.c
+++ b/src/kernel/xloop_main_5.15.c
@@ -2034,7 +2034,9 @@ static const struct blk_mq_ops xloop_mq_ops = {
.complete = xlo_complete_rq,
};
+#ifdef CONFIG_DEBUG_FS
static struct dentry *xloop_dbgfs_dir;
+#endif
static int xloop_add(int i)
{
@@ -2191,7 +2193,9 @@ out:
static void xloop_remove(struct xloop_device *xlo)
{
xloop_file_fmt_free(xlo->xlo_fmt);
+#ifdef CONFIG_DEBUG_FS
debugfs_remove(xlo->xlo_dbgfs_dir);
+#endif
/* Make this xloop device unreachable from pathname. */
del_gendisk(xlo->xlo_disk);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)