diff options
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 19df0e5af122..f2513fb8c391 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -484,7 +484,7 @@ send_nt_cancel(struct TCP_Server_Info *server, struct smb_hdr *in_buf, | |||
484 | in_buf->smb_buf_length = cpu_to_be32(sizeof(struct smb_hdr) - 4 + 2); | 484 | in_buf->smb_buf_length = cpu_to_be32(sizeof(struct smb_hdr) - 4 + 2); |
485 | in_buf->Command = SMB_COM_NT_CANCEL; | 485 | in_buf->Command = SMB_COM_NT_CANCEL; |
486 | in_buf->WordCount = 0; | 486 | in_buf->WordCount = 0; |
487 | put_bcc_le(0, in_buf); | 487 | put_bcc(0, in_buf); |
488 | 488 | ||
489 | mutex_lock(&server->srv_mutex); | 489 | mutex_lock(&server->srv_mutex); |
490 | rc = cifs_sign_smb(in_buf, server, &mid->sequence_number); | 490 | rc = cifs_sign_smb(in_buf, server, &mid->sequence_number); |
@@ -644,11 +644,6 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
644 | rc = map_smb_to_linux_error(midQ->resp_buf, | 644 | rc = map_smb_to_linux_error(midQ->resp_buf, |
645 | flags & CIFS_LOG_ERROR); | 645 | flags & CIFS_LOG_ERROR); |
646 | 646 | ||
647 | /* convert ByteCount if necessary */ | ||
648 | if (receive_len >= sizeof(struct smb_hdr) - 4 | ||
649 | /* do not count RFC1001 header */ + | ||
650 | (2 * midQ->resp_buf->WordCount) + 2 /* bcc */ ) | ||
651 | put_bcc(get_bcc_le(midQ->resp_buf), midQ->resp_buf); | ||
652 | if ((flags & CIFS_NO_RESP) == 0) | 647 | if ((flags & CIFS_NO_RESP) == 0) |
653 | midQ->resp_buf = NULL; /* mark it so buf will | 648 | midQ->resp_buf = NULL; /* mark it so buf will |
654 | not be freed by | 649 | not be freed by |
@@ -798,12 +793,6 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
798 | 793 | ||
799 | /* BB special case reconnect tid and uid here? */ | 794 | /* BB special case reconnect tid and uid here? */ |
800 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); | 795 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); |
801 | |||
802 | /* convert ByteCount if necessary */ | ||
803 | if (receive_len >= sizeof(struct smb_hdr) - 4 | ||
804 | /* do not count RFC1001 header */ + | ||
805 | (2 * out_buf->WordCount) + 2 /* bcc */ ) | ||
806 | put_bcc(get_bcc_le(midQ->resp_buf), midQ->resp_buf); | ||
807 | } else { | 796 | } else { |
808 | rc = -EIO; | 797 | rc = -EIO; |
809 | cERROR(1, "Bad MID state?"); | 798 | cERROR(1, "Bad MID state?"); |
@@ -1012,12 +1001,6 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
1012 | /* BB special case reconnect tid and uid here? */ | 1001 | /* BB special case reconnect tid and uid here? */ |
1013 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); | 1002 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); |
1014 | 1003 | ||
1015 | /* convert ByteCount if necessary */ | ||
1016 | if (receive_len >= sizeof(struct smb_hdr) - 4 | ||
1017 | /* do not count RFC1001 header */ + | ||
1018 | (2 * out_buf->WordCount) + 2 /* bcc */ ) | ||
1019 | put_bcc(get_bcc_le(out_buf), out_buf); | ||
1020 | |||
1021 | out: | 1004 | out: |
1022 | delete_mid(midQ); | 1005 | delete_mid(midQ); |
1023 | if (rstart && rc == -EACCES) | 1006 | if (rstart && rc == -EACCES) |