diff options
author | Hannes Reinecke | 2023-10-12 14:59:54 +0200 |
---|---|---|
committer | Keith Busch | 2023-10-17 13:57:54 -0700 |
commit | bbacf79201a1664f174e341f4bc0205b25b309d7 (patch) | |
tree | 3ee23b74f203ad48bbb674430ee1e16ff08fa5f2 /drivers/nvme | |
parent | d680063482885c15d68e958212c3d6ad40a510dd (diff) |
nvmet-tcp: use 'spin_lock_bh' for state_lock()
nvmet_tcp_schedule_release_queue() is called from socket state
change callbacks, which may be called from an softirq context.
So use 'spin_lock_bh' to avoid a spin lock warning.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index 0dc3b75de7b6..4336fe048e43 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -1379,7 +1379,7 @@ static void nvmet_tcp_release_queue(struct kref *kref) static void nvmet_tcp_schedule_release_queue(struct nvmet_tcp_queue *queue) { - spin_lock(&queue->state_lock); + spin_lock_bh(&queue->state_lock); if (queue->state == NVMET_TCP_Q_TLS_HANDSHAKE) { /* Socket closed during handshake */ tls_handshake_cancel(queue->sock->sk); @@ -1388,7 +1388,7 @@ static void nvmet_tcp_schedule_release_queue(struct nvmet_tcp_queue *queue) queue->state = NVMET_TCP_Q_DISCONNECTING; kref_put(&queue->kref, nvmet_tcp_release_queue); } - spin_unlock(&queue->state_lock); + spin_unlock_bh(&queue->state_lock); } static inline void nvmet_tcp_arm_queue_deadline(struct nvmet_tcp_queue *queue) |