On Wed, Apr 24, 2019 at 07:02:14PM +0800, Ming Lei wrote: > With holding queue's kobject refcount, it is safe for driver > to schedule requeue. However, blk_mq_kick_requeue_list() may > be called after blk_sync_queue() is done because of concurrent > requeue activities, then requeue work may not be completed when > freeing queue, and kernel oops is triggered. > > So moving the cancel of requeue_work into blk_mq_release() for > avoiding race between requeue and freeing queue. Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx>