diff mbox series

[05/11] block: remove the blk_flush_integrity call in blk_integrity_unregister

Message ID 20240607055912.3586772-6-hch@lst.de (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series [01/11] dm-integrity: use the nop integrity profile | expand

Checks

Context Check Description
mdraidci/vmtest-md-6_11-PR fail merge-conflict

Commit Message

Christoph Hellwig June 7, 2024, 5:58 a.m. UTC
Now that there are no indirect calls for PI processing there is no
way to dereference a NULL pointer here.  Additionally drivers now always
freeze the queue (or in case of stacking drivers use their internal
equivalent) around changing the integrity profile.

This is effectively a revert of commit 3df49967f6f1 ("block: flush the
integrity workqueue in blk_integrity_unregister").

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-integrity.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Hannes Reinecke June 7, 2024, 6:16 a.m. UTC | #1
On 6/7/24 07:58, Christoph Hellwig wrote:
> Now that there are no indirect calls for PI processing there is no
> way to dereference a NULL pointer here.  Additionally drivers now always
> freeze the queue (or in case of stacking drivers use their internal
> equivalent) around changing the integrity profile.
> 
> This is effectively a revert of commit 3df49967f6f1 ("block: flush the
> integrity workqueue in blk_integrity_unregister").
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/blk-integrity.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/block/blk-integrity.c b/block/blk-integrity.c
> index 17d37badfbb8bc..24f04575096d39 100644
> --- a/block/blk-integrity.c
> +++ b/block/blk-integrity.c
> @@ -401,8 +401,6 @@ void blk_integrity_unregister(struct gendisk *disk)
>   	if (!bi->tuple_size)
>   		return;
>   
> -	/* ensure all bios are off the integrity workqueue */
> -	blk_flush_integrity();
>   	blk_queue_flag_clear(QUEUE_FLAG_STABLE_WRITES, disk->queue);
>   	memset(bi, 0, sizeof(*bi));
>   }

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Martin K. Petersen June 10, 2024, 12:01 p.m. UTC | #2
Christoph,

> Now that there are no indirect calls for PI processing there is no
> way to dereference a NULL pointer here.  Additionally drivers now always
> freeze the queue (or in case of stacking drivers use their internal
> equivalent) around changing the integrity profile.
>
> This is effectively a revert of commit 3df49967f6f1 ("block: flush the
> integrity workqueue in blk_integrity_unregister").

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
diff mbox series

Patch

diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 17d37badfbb8bc..24f04575096d39 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -401,8 +401,6 @@  void blk_integrity_unregister(struct gendisk *disk)
 	if (!bi->tuple_size)
 		return;
 
-	/* ensure all bios are off the integrity workqueue */
-	blk_flush_integrity();
 	blk_queue_flag_clear(QUEUE_FLAG_STABLE_WRITES, disk->queue);
 	memset(bi, 0, sizeof(*bi));
 }