lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[16/24] cifs: add fallback in is_path_accessible for old servers
    2.6.33-longterm review patch.  If anyone has any objections, please let us know.

    ------------------
    Content-Length: 1036
    Lines: 32

    From: Jeff Layton <jlayton@redhat.com>

    commit 221d1d797202984cb874e3ed9f1388593d34ee22 upstream.

    The is_path_accessible check uses a QPathInfo call, which isn't
    supported by ancient win9x era servers. Fall back to an older
    SMBQueryInfo call if it fails with the magic error codes.

    Reported-and-Tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    fs/cifs/connect.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/fs/cifs/connect.c
    +++ b/fs/cifs/connect.c
    @@ -2253,6 +2253,11 @@ is_path_accessible(int xid, struct cifsT
    0 /* not legacy */, cifs_sb->local_nls,
    cifs_sb->mnt_cifs_flags &
    CIFS_MOUNT_MAP_SPECIAL_CHR);
    +
    + if (rc == -EOPNOTSUPP || rc == -EINVAL)
    + rc = SMBQueryInformation(xid, tcon, full_path, pfile_info,
    + cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
    + CIFS_MOUNT_MAP_SPECIAL_CHR);
    kfree(pfile_info);
    return rc;
    }



    \
     
     \ /
      Last update: 2011-05-19 20:39    [W:4.234 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site