diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2014-12-09 17:37:00 (GMT) |
---|---|---|
committer | Steve French <steve.french@primarydata.com> | 2014-12-14 20:55:45 (GMT) |
commit | 9235d09873316d602937b5d45c431fb653f3aed8 (patch) | |
tree | 57891955422b96f3226fd913eefcae0d2e1f1611 /fs/cifs/cifsglob.h | |
parent | 9ea18f8cab5f1c36cdd0f09717e35ceb48c36a87 (diff) | |
download | linux-9235d09873316d602937b5d45c431fb653f3aed8.tar.xz |
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/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 6e13911..22b289a 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -661,16 +661,16 @@ set_credits(struct TCP_Server_Info *server, const int val) server->ops->set_credits(server, val); } -static inline __u64 +static inline __le64 get_next_mid64(struct TCP_Server_Info *server) { - return server->ops->get_next_mid(server); + return cpu_to_le64(server->ops->get_next_mid(server)); } static inline __le16 get_next_mid(struct TCP_Server_Info *server) { - __u16 mid = get_next_mid64(server); + __u16 mid = server->ops->get_next_mid(server); /* * The value in the SMB header should be little endian for easy * on-the-wire decoding. |