cifs: fill TRANS2_QUERY_FILE_INFO ByteCount fields
authorDavid Disseldorp <ddiss@suse.de>
Fri, 28 Jun 2013 09:47:33 +0000 (11:47 +0200)
committerSteve French <smfrench@gmail.com>
Sat, 29 Jun 2013 05:09:44 +0000 (00:09 -0500)
commit7ac0febb81259fb9e0c447e0b90d0f05f409a02b
tree7de471917210663b00bd2f690a408e1eeb04ff5a
parent50285882fdd919e2b9617fc844b4816b7833f115
cifs: fill TRANS2_QUERY_FILE_INFO ByteCount fields

Currently the trans2 ByteCount field is incorrectly left zero in
TRANS2_QUERY_FILE_INFO info_level=SMB_QUERY_FILE_ALL_INFO and
info_level=SMB_QUERY_FILE_UNIX_BASIC requests. The field should properly
reflect the FID, information_level and padding bytes carried in these
requests.

Leaving this field zero causes such requests to fail against Novell CIFS
servers. Other SMB servers (e.g. Samba) use the parameter count fields
for data length calculations instead, so do not suffer the same fate.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifssmb.c