From 0298cbb562cb41681075969036bbeec3aa175356 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 1 Feb 2017 10:49:49 -0800 Subject: [PATCH] Fix compact cleanup on mount failure scoutfs_compact_destroy() was testing the wrong pointer to see if _setup() had built up resources that needed to be torn down. It'd crash on mount failure. Signed-off-by: Zach Brown --- kmod/src/compact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/compact.c b/kmod/src/compact.c index a0f951cd..cce6715f 100644 --- a/kmod/src/compact.c +++ b/kmod/src/compact.c @@ -687,7 +687,7 @@ void scoutfs_compact_destroy(struct super_block *sb) { DECLARE_COMPACT_INFO(sb, ci); - if (ci->workq) { + if (ci) { flush_work(&ci->work); destroy_workqueue(ci->workq); }