summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorPotnuri Bharat Teja <bharat@chelsio.com>2019-07-08 12:52:00 +0300
committerSagi Grimberg <sagi@grimberg.me>2019-08-29 22:55:00 +0300
commit10407ec9b42d30a6ebc49f7f84e2bb2131438699 (patch)
treec9844a5cb90bc5b0ed62c9729e616ed417591500 /drivers/nvme
parent6be182607db98f9672865fed3ee3bf8b98e62dd4 (diff)
downloadlinux-10407ec9b42d30a6ebc49f7f84e2bb2131438699.tar.xz
nvme-tcp: Use protocol specific operations while reading socket
Using socket specific read_sock() calls instead of directly calling tcp_read_sock() helps lld module registered handlers if any, to be called from nvme-tcp host. This patch therefore replaces the tcp_read_sock() with socket specific prot_ops. Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com> Acked-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 2c5df86882cc..53c32f9bba08 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1018,14 +1018,15 @@ done:
static int nvme_tcp_try_recv(struct nvme_tcp_queue *queue)
{
- struct sock *sk = queue->sock->sk;
+ struct socket *sock = queue->sock;
+ struct sock *sk = sock->sk;
read_descriptor_t rd_desc;
int consumed;
rd_desc.arg.data = queue;
rd_desc.count = 1;
lock_sock(sk);
- consumed = tcp_read_sock(sk, &rd_desc, nvme_tcp_recv_skb);
+ consumed = sock->ops->read_sock(sk, &rd_desc, nvme_tcp_recv_skb);
release_sock(sk);
return consumed;
}