[4/7] CIFS: Do not hide EINTR after sending network packets
diff mbox series

Message ID 1547159098-19011-5-git-send-email-pshilov@microsoft.com
State New
Headers show
  • SMB3 credit flow control handling and writeback fixes
Related show

Commit Message

Pavel Shilovsky Jan. 10, 2019, 10:24 p.m. UTC
Currently we hide EINTR code returned from sock_sendmsg()
and return 0 instead. This makes a caller think that we
have successfully completed the network operation which is
not true. Fix this by properly returning EINTR to callers.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
 fs/cifs/transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index e047f06..aaff9c5 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -387,7 +387,7 @@  __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
 	if (rc < 0 && rc != -EINTR)
 		cifs_dbg(VFS, "Error %d sending data on socket to server\n",
-	else
+	else if (rc > 0)
 		rc = 0;
 	return rc;