summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2019-01-10 22:27:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-26 11:44:23 +0300
commitde92e4baf2b85bbd6e33d2b11966a76391fc30de (patch)
treed5568f2e4daaf99ef562d082b57555e20cc6ce33 /fs
parent0c9c58b95e9f7c5687ca8b6227ce735d269c0585 (diff)
downloadlinux-de92e4baf2b85bbd6e33d2b11966a76391fc30de.tar.xz
CIFS: Do not hide EINTR after sending network packets
commit ee13919c2e8d1f904e035ad4b4239029a8994131 upstream. Currently we hide EINTR code returned from sock_sendmsg() and return 0 instead. This makes a caller think that we 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> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 27dfb1e8aeaf..11027bef1058 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -360,7 +360,7 @@ uncork:
if (rc < 0 && rc != -EINTR)
cifs_dbg(VFS, "Error %d sending data on socket to server\n",
rc);
- else
+ else if (rc > 0)
rc = 0;
return rc;