summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-09-19 18:43:47 +0200
committerSteve French <smfrench@gmail.com>2017-09-20 08:38:44 +0200
commit590d08d3da45e9fed423b08ab38d71886c07abc8 (patch)
treebe088b886bd31a2f3a41a0c772a809f88c9d083a /fs/cifs
parentFix SMB3.1.1 guest authentication to Samba (diff)
downloadlinux-590d08d3da45e9fed423b08ab38d71886c07abc8.tar.xz
linux-590d08d3da45e9fed423b08ab38d71886c07abc8.zip
SMB3: Fix endian warning
Multi-dialect negotiate patch had a minor endian error. Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> CC: Stable <stable@vger.kernel.org> # 4.13+
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index b0eaebe627e9..b4c58a1db1ae 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -570,10 +570,11 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
/* ops set to 3.0 by default for default so update */
ses->server->ops = &smb21_operations;
}
- } else if (rsp->DialectRevision != ses->server->vals->protocol_id) {
+ } else if (le16_to_cpu(rsp->DialectRevision) !=
+ ses->server->vals->protocol_id) {
/* if requested single dialect ensure returned dialect matched */
cifs_dbg(VFS, "Illegal 0x%x dialect returned: not requested\n",
- cpu_to_le16(rsp->DialectRevision));
+ le16_to_cpu(rsp->DialectRevision));
return -EIO;
}