Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61de800d authored by Steve French's avatar Steve French
Browse files

[CIFS] fix error in smb_send2



smb_send2 exit logic was strange, and with the previous change
could cause us to fail large
smb writes when all of the smb was not sent as one chunk.

Acked-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent edf1ae40
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -290,8 +290,11 @@ smb_send2(struct TCP_Server_Info *server, struct kvec *iov, int n_vec,
		if (rc < 0)
			break;

		if (rc >= total_len) {
			WARN_ON(rc > total_len);
		if (rc == total_len) {
			total_len = 0;
			break;
		} else if (rc > total_len) {
			cERROR(1, ("sent %d requested %d", rc, total_len));
			break;
		}
		if (rc == 0) {
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.