[lkml]   [2008]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 14/27] CIFS: fix saving of resume key before CIFSFindNext
    2.6.27-stable review patch.  If anyone has any objections, please let us 

    From: Jeff Layton <>

    commit a364bc0b37f14ffd66c1f982af42990a9d77fa43 upstream

    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 <>
    Signed-off-by: Steve French <>
    Signed-off-by: Greg Kroah-Hartman <>

    fs/cifs/readdir.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/fs/cifs/readdir.c
    +++ b/fs/cifs/readdir.c
    @@ -762,14 +762,15 @@ static int find_cifs_entry(const int xid
    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,
    + cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile);
    if (rc)
    return -ENOENT;

     \ /
      Last update: 2008-10-24 06:48    [W:0.058 / U:3.988 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site