summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2021-03-15 13:53:47 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 11:54:03 +0100
commit676354044bf5dc54b3e50067b5b20416a83be032 (patch)
tree9af728ed7ae5adfd31999d3389d7c097a5ef9a98 /drivers
parent58ba0629d6f89a1a4045bc167de3793c72be01ff (diff)
downloadlinux-676354044bf5dc54b3e50067b5b20416a83be032.tar.gz
linux-676354044bf5dc54b3e50067b5b20416a83be032.tar.bz2
linux-676354044bf5dc54b3e50067b5b20416a83be032.zip
nvme-tcp: fix misuse of __smp_processor_id with preemption enabled
commit bb83337058a7000644cdeffc67361d2473534756 upstream. For our pure advisory use-case, we only rely on this call as a hint, so fix the warning complaints of using the smp_processor_id variants with preemption enabled. Fixes: db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context") Fixes: ada831772188 ("nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT") Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Tested-by: Yi Zhang <yi.zhang@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 30d24a5a5b82..fc9cdb7ba179 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -287,7 +287,7 @@ static inline void nvme_tcp_queue_request(struct nvme_tcp_request *req,
* directly, otherwise queue io_work. Also, only do that if we
* are on the same cpu, so we don't introduce contention.
*/
- if (queue->io_cpu == __smp_processor_id() &&
+ if (queue->io_cpu == raw_smp_processor_id() &&
sync && empty && mutex_trylock(&queue->send_mutex)) {
queue->more_requests = !last;
nvme_tcp_send_all(queue);