From d7c4c2db6466799a154bae58ece6623f12632991 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 23 Jul 2008 17:45:58 -0700 Subject: [PATCH] --- yaml --- r: 106264 b: refs/heads/master c: 5ca33c6ac30596fc1403a092f46ea48c406734e4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifssmb.c | 5 ++++- trunk/fs/cifs/connect.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 43f04aa0aecd..133157984b9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8efdbde647f542ce0d303273df7ad4157caa03d0 +refs/heads/master: 5ca33c6ac30596fc1403a092f46ea48c406734e4 diff --git a/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index 4511b708f0f3..7e175e1399d1 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -3914,7 +3914,10 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, bool is_unicode; struct dfs_referral_level_3 *ref; - is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE; + if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) + is_unicode = true; + else + is_unicode = false; *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); if (*num_of_nodes < 1) { diff --git a/trunk/fs/cifs/connect.c b/trunk/fs/cifs/connect.c index 644462729387..b51d5777cde6 100644 --- a/trunk/fs/cifs/connect.c +++ b/trunk/fs/cifs/connect.c @@ -455,7 +455,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) /* Note that FC 1001 length is big endian on the wire, but we convert it here so it is always manipulated as host byte order */ - pdu_length = ntohl(smb_buffer->smb_buf_length); + pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length); smb_buffer->smb_buf_length = pdu_length; cFYI(1, ("rfc1002 length 0x%x", pdu_length+4));