]> git.baikalelectronics.ru Git - kernel.git/commit
[CIFS] make sure we have the right resume info before calling CIFSFindNext
authorSteve French <sfrench@us.ibm.com>
Tue, 7 Oct 2008 20:03:33 +0000 (20:03 +0000)
committerSteve French <sfrench@us.ibm.com>
Tue, 7 Oct 2008 20:03:33 +0000 (20:03 +0000)
commitb552f634f12cd5634f41c0631217819d6af757f8
tree3abf826e49b8e550863254f135ec573d7fd1107c
parente9be78246fc0f1ef707bf91632ebdf1a4b03ebdc
[CIFS] make sure we have the right resume info before calling CIFSFindNext

When we do a seekdir() or equivalent, we usually end up doing a
FindFirst call and then call FindNext until we get to the offset that we
want. The problem is that when we call FindNext, the code usually
doesn't have the proper info (mostly, the filename of the entry from the
last search) to resume the search.

Add a "last_entry" field to the cifs_search_info that points to the last
entry in the search. We calculate this pointer by using the
LastNameOffset field from the search parms that are returned. We then
use that info to do a cifs_save_resume_key before we call CIFSFindNext.

This patch allows CIFS to reliably pass the "telldir" connectathon test.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
CC: Stable <stable@kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/readdir.c