summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2transport.c
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2014-12-09 17:37:00 +0000
committerSteve French <steve.french@primarydata.com>2014-12-14 14:55:45 -0600
commit9235d09873316d602937b5d45c431fb653f3aed8 (patch)
tree57891955422b96f3226fd913eefcae0d2e1f1611 /fs/cifs/smb2transport.c
parent9ea18f8cab5f1c36cdd0f09717e35ceb48c36a87 (diff)
downloadtalos-op-linux-9235d09873316d602937b5d45c431fb653f3aed8.tar.gz
talos-op-linux-9235d09873316d602937b5d45c431fb653f3aed8.zip
Convert MessageID in smb2_hdr to LE
We have encountered failures when When testing smb2 mounts on ppc64 machines when using both Samba as well as Windows 2012. On poking around, the problem was determined to be caused by the high endian MessageID passed in the header for smb2. On checking the corresponding MID for smb1 is converted to LE before being sent on the wire. We have tested this patch successfully on a ppc64 machine. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Diffstat (limited to 'fs/cifs/smb2transport.c')
-rw-r--r--fs/cifs/smb2transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
index 5111e7272db6..d4c5b6f109a7 100644
--- a/fs/cifs/smb2transport.c
+++ b/fs/cifs/smb2transport.c
@@ -490,7 +490,7 @@ smb2_mid_entry_alloc(const struct smb2_hdr *smb_buffer,
return temp;
else {
memset(temp, 0, sizeof(struct mid_q_entry));
- temp->mid = smb_buffer->MessageId; /* always LE */
+ temp->mid = le64_to_cpu(smb_buffer->MessageId);
temp->pid = current->pid;
temp->command = smb_buffer->Command; /* Always LE */
temp->when_alloc = jiffies;
OpenPOWER on IntegriCloud