diff options
author | Simon Rettberg | 2023-11-29 14:48:42 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-29 14:48:42 +0100 |
commit | a28f8f762d89b47db836cdb66a2aa817900f313f (patch) | |
tree | 6fdcc85ff153cf6680ff66c0099216e6dd6f91a6 | |
parent | [KERNEL] initial support for RHEL Kernel 5.18.x (diff) | |
download | xloop-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.c | 4 |
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) |