Commit 02b3c61a authored by Zhaoyang Huang's avatar Zhaoyang Huang Committed by Jens Axboe
Browse files

Revert "driver: block: release the lo_work_lock before queue_work"



This reverts commit ad934fc1784802fd1408224474b25ee5289fadfc.

loop_queue_work should be strictly serialized to loop_process_work since
the lo_worker could be freed without noticing new work has been queued
again.

Signed-off-by: default avatarZhaoyang Huang <zhaoyang.huang@unisoc.com>
Link: https://lore.kernel.org/r/20250218065835.19503-1-zhaoyang.huang@unisoc.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a052bfa6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -894,8 +894,8 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)
		cmd_list = &lo->rootcg_cmd_list;
	}
	list_add_tail(&cmd->list_entry, cmd_list);
	spin_unlock_irq(&lo->lo_work_lock);
	queue_work(lo->workqueue, work);
	spin_unlock_irq(&lo->lo_work_lock);
}

static void loop_set_timer(struct loop_device *lo)