From: Mikulas Patocka Date: Tue, 22 Apr 2025 19:18:33 +0000 (+0200) Subject: dm-integrity: fix a warning on invalid table line X-Git-Tag: v5.10.238~257 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0a9d266cc5546b875de7cadc2feb158ce1703fc;p=thirdparty%2Fkernel%2Fstable.git dm-integrity: fix a warning on invalid table line commit 0a533c3e4246c29d502a7e0fba0e86d80a906b04 upstream. If we use the 'B' mode and we have an invalit table line, cancel_delayed_work_sync would trigger a warning. This commit avoids the warning. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 934887f8a855f..07a7b4e51f0ef 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -4392,7 +4392,7 @@ static void dm_integrity_dtr(struct dm_target *ti) BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress)); BUG_ON(!list_empty(&ic->wait_list)); - if (ic->mode == 'B') + if (ic->mode == 'B' && ic->bitmap_flush_work.work.func) cancel_delayed_work_sync(&ic->bitmap_flush_work); if (ic->metadata_wq) destroy_workqueue(ic->metadata_wq);