This is a note to let you know that I've just added the patch titled block: remove the blk_flush_integrity call in blk_integrity_unregister to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: block-remove-the-blk_flush_integrity-call-in-blk_int.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit b17ad227f43e9d28a73daaf3f100034f5bede9fd Author: Christoph Hellwig <hch@xxxxxx> Date: Thu Jun 13 10:48:16 2024 +0200 block: remove the blk_flush_integrity call in blk_integrity_unregister [ Upstream commit e8bc14d116aeac8f0f133ec8d249acf4e0658da7 ] 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@xxxxxx> Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Link: https://lore.kernel.org/r/20240613084839.1044015-7-hch@xxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 69eed260a823..e2d88611d5bf 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -431,8 +431,6 @@ void blk_integrity_unregister(struct gendisk *disk) if (!bi->profile) 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)); }