mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
nvme-tcp: break from io_work loop if recv failed
If we failed to receive data from the socket, don't try to further process it, we will for sure be handling a queue error at this point. While no issue was seen with the current behavior thus far, its safer to cease socket processing if we detected an error. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
5ff4e11264
commit
761ad26c45
1 changed files with 2 additions and 0 deletions
|
@ -1074,6 +1074,8 @@ static void nvme_tcp_io_work(struct work_struct *w)
|
|||
result = nvme_tcp_try_recv(queue);
|
||||
if (result > 0)
|
||||
pending = true;
|
||||
else if (unlikely(result < 0))
|
||||
break;
|
||||
|
||||
if (!pending)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue