Skip to content

Commit 0a533c3

Browse files
author
Mikulas Patocka
committed
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: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org
1 parent a3d8f0a commit 0a533c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5164,7 +5164,7 @@ static void dm_integrity_dtr(struct dm_target *ti)
51645164
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
51655165
BUG_ON(!list_empty(&ic->wait_list));
51665166

5167-
if (ic->mode == 'B')
5167+
if (ic->mode == 'B' && ic->bitmap_flush_work.work.func)
51685168
cancel_delayed_work_sync(&ic->bitmap_flush_work);
51695169
if (ic->metadata_wq)
51705170
destroy_workqueue(ic->metadata_wq);

0 commit comments

Comments
 (0)