aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifssmb.c5
-rw-r--r--fs/cifs/connect.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4511b708f0f3..7e175e1399d1 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3914,7 +3914,10 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3914 bool is_unicode; 3914 bool is_unicode;
3915 struct dfs_referral_level_3 *ref; 3915 struct dfs_referral_level_3 *ref;
3916 3916
3917 is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE; 3917 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
3918 is_unicode = true;
3919 else
3920 is_unicode = false;
3918 *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); 3921 *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals);
3919 3922
3920 if (*num_of_nodes < 1) { 3923 if (*num_of_nodes < 1) {
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 644462729387..b51d5777cde6 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -455,7 +455,7 @@ incomplete_rcv:
455 /* Note that FC 1001 length is big endian on the wire, 455 /* Note that FC 1001 length is big endian on the wire,
456 but we convert it here so it is always manipulated 456 but we convert it here so it is always manipulated
457 as host byte order */ 457 as host byte order */
458 pdu_length = ntohl(smb_buffer->smb_buf_length); 458 pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length);
459 smb_buffer->smb_buf_length = pdu_length; 459 smb_buffer->smb_buf_length = pdu_length;
460 460
461 cFYI(1, ("rfc1002 length 0x%x", pdu_length+4)); 461 cFYI(1, ("rfc1002 length 0x%x", pdu_length+4));