cifs: use get/put_unaligned functions to access ByteCount
authorJeff Layton <jlayton@redhat.com>
Thu, 20 Jan 2011 18:36:51 +0000 (13:36 -0500)
committerSteve French <sfrench@us.ibm.com>
Thu, 20 Jan 2011 21:46:29 +0000 (21:46 +0000)
commit690c522fa5a62825af880775e3ef1e55755667b2
treeff953bba1050b54cc9be452a599ac1faf580c3b7
parentaae62fdb6b9a6605abdea7370c4a0e005e6c1cd7
cifs: use get/put_unaligned functions to access ByteCount

It's possible that when we access the ByteCount that the alignment
will be off. Most CPUs deal with that transparently, but there's
usually some performance impact. Some CPUs raise an exception on
unaligned accesses.

Fix this by accessing the byte count using the get_unaligned and
put_unaligned inlined functions. While we're at it, fix the types
of some of the variables that end up getting returns from these
functions.

Acked-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifspdu.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/netmisc.c
fs/cifs/sess.c
fs/cifs/transport.c