cifs: clean up checkSMB
authorJeff Layton <jlayton@redhat.com>
Tue, 11 Oct 2011 10:41:32 +0000 (06:41 -0400)
committerSteve French <smfrench@gmail.com>
Thu, 13 Oct 2011 04:41:36 +0000 (23:41 -0500)
commit376b43f41c8b9315f7efdf085d214b6024337381
tree0a5e1959a71d2b645faf731ae062c7a27fdc8421
parentc974befa402b5eb2ed115b3083b5a46a4be85a9f
cifs: clean up checkSMB

The variable names in this function are so ambiguous that it's very
difficult to know what it's doing. Rename them to make it a bit more
clear.

Also, remove a redundant length check. cifsd checks to make sure that
the rfclen isn't larger than the maximum frame size when it does the
receive.

Finally, change checkSMB to return a real error code (-EIO) when
it finds an error. That will help simplify some coming changes in the
callers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/misc.c