From a28f8f762d89b47db836cdb66a2aa817900f313f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 Nov 2023 14:48:42 +0100 Subject: Add missing CONFIG_DEBUG_FS checks --- src/kernel/xloop_main_5.15.c | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3-55-g7522