[linux-cifs-client] Re: [PATCH] cifs: fix saving of resume key before CIFSFindNext

Steve French smfrench at gmail.com
Tue Oct 21 14:43:59 GMT 2008


merged and CCed stable

On Tue, Oct 21, 2008 at 7:27 AM, Jeff Layton <jlayton at redhat.com> wrote:
> Steve, this should probably go to stable if you think this is correct,
> let me know and I'll resend and CC stable...
>
> We recently fixed the cifs readdir code so that it saves the resume key
> before calling CIFSFindNext. Unfortunately, this assumes that we have
> just done a CIFSFindFirst (or FindNext) and have resume info to save.
> This isn't necessarily the case. Fix the code to save resume info if we
> had to reinitiate the search, and after a FindNext.
>
> This fixes connectathon basic test6 against NetApp filers.
>
>
> Signed-off-by: Jeff Layton <jlayton at redhat.com>
> ---
>  fs/cifs/readdir.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
> index 765adf1..58d5729 100644
> --- a/fs/cifs/readdir.c
> +++ b/fs/cifs/readdir.c
> @@ -762,14 +762,15 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
>                                 rc));
>                        return rc;
>                }
> +               cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile);
>        }
>
>        while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
>              (rc == 0) && !cifsFile->srch_inf.endOfSearch) {
>                cFYI(1, ("calling findnext2"));
> -               cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile);
>                rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
>                                  &cifsFile->srch_inf);
> +               cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile);
>                if (rc)
>                        return -ENOENT;
>        }
> --
> 1.5.5.1
>
>



-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list