]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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>
Wed, 12 Oct 2011 20:15:18 +0000 (15:15 -0500)
commit3bcfd5ff707ea4e4661ed6e233baf18596ba01a0
tree0a5e1959a71d2b645faf731ae062c7a27fdc8421
parentbc70e6f37ce83c92bca6d88bebb332e4e7c52004
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>
fs/cifs/misc.c