Skip to content

Commit ada8317

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT
We shouldn't call smp_processor_id() in a preemptible context, but this is advisory at best, so instead call __smp_processor_id(). Fixes: db5ad6b ("nvme-tcp: try to send request in queue_rq context") Reported-by: Or Gerlitz <[email protected]> Reported-by: Yi Zhang <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 7a84665 commit ada8317

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static inline void nvme_tcp_queue_request(struct nvme_tcp_request *req,
286286
* directly, otherwise queue io_work. Also, only do that if we
287287
* are on the same cpu, so we don't introduce contention.
288288
*/
289-
if (queue->io_cpu == smp_processor_id() &&
289+
if (queue->io_cpu == __smp_processor_id() &&
290290
sync && empty && mutex_trylock(&queue->send_mutex)) {
291291
queue->more_requests = !last;
292292
nvme_tcp_send_all(queue);

0 commit comments

Comments
 (0)