diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-10-10 18:34:12 +0300 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2019-10-14 17:27:01 +0300 |
commit | ac1c4e18858cb1da6abe1932a7ca001c37f62372 (patch) | |
tree | fd5d5f55819e3e916fdfdf31e69e078a853b3bcd /drivers/nvme/host/tcp.c | |
parent | c1ac9a4b0797ca8bb4470f863a5f78ef1ab13bed (diff) | |
download | linux-ac1c4e18858cb1da6abe1932a7ca001c37f62372.tar.xz |
nvme-tcp: Initialize sk->sk_ll_usec only with NET_RX_BUSY_POLL
The access to sk->sk_ll_usec should be hidden behind
CONFIG_NET_RX_BUSY_POLL like the definition of sk_ll_usec.
Put access to ->sk_ll_usec behind CONFIG_NET_RX_BUSY_POLL.
Fixes: 1a9460cef5711 ("nvme-tcp: support simple polling")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 33de2fddfbb2..820dac10fa9e 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1386,7 +1386,9 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl, queue->sock->sk->sk_data_ready = nvme_tcp_data_ready; queue->sock->sk->sk_state_change = nvme_tcp_state_change; queue->sock->sk->sk_write_space = nvme_tcp_write_space; +#ifdef CONFIG_NET_RX_BUSY_POLL queue->sock->sk->sk_ll_usec = 1; +#endif write_unlock_bh(&queue->sock->sk->sk_callback_lock); return 0; |