aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-01-20 21:19:25 -0500
committerSteve French <sfrench@us.ibm.com>2011-01-20 21:23:27 -0500
commit99d86c8f1b7101d7c55dbf644b32bb1f0d7eb303 (patch)
tree7ec07aeb365ea5f16dfd1ce1a2295e073d362ac6 /fs
parentbf67b9be97baea84386abca38b2503bb286571dc (diff)
cifs: fix up CIFSSMBEcho for unaligned access
Make sure that CIFSSMBEcho can handle unaligned fields. Also fix a minor bug that causes this warning: fs/cifs/cifssmb.c: In function 'CIFSSMBEcho': fs/cifs/cifssmb.c:740: warning: large integer implicitly truncated to unsigned type ...WordCount is u8, not __le16, so no need to convert it. This patch should apply cleanly on top of the rest of the patchset to clean up unaligned access. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 675041a6949c..3106f5e5c633 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -733,9 +733,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
733 733
734 /* set up echo request */ 734 /* set up echo request */
735 smb->hdr.Tid = cpu_to_le16(0xffff); 735 smb->hdr.Tid = cpu_to_le16(0xffff);
736 smb->hdr.WordCount = cpu_to_le16(1); 736 smb->hdr.WordCount = 1;
737 smb->EchoCount = cpu_to_le16(1); 737 put_unaligned_le16(1, &smb->EchoCount);
738 smb->ByteCount = cpu_to_le16(1); 738 put_bcc_le(1, &smb->hdr);
739 smb->Data[0] = 'a'; 739 smb->Data[0] = 'a';
740 smb->hdr.smb_buf_length += 3; 740 smb->hdr.smb_buf_length += 3;
741 741