Commit 0a533c3e authored by Mikulas Patocka's avatar Mikulas Patocka
Browse files

dm-integrity: fix a warning on invalid table line



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: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
parent a3d8f0a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5164,7 +5164,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);