diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-05-17 06:40:30 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2011-08-01 13:54:48 -0700 |
commit | e68fd06bd319088e3fbeb40be74cdd444242cfd6 (patch) | |
tree | bb08769c7f24ec14859b1dc4443ab05a389555f0 /fs/cifs | |
parent | 2dcdb613c69f16e6c22b05010a92c104b8a8deee (diff) |
cifs: add fallback in is_path_accessible for old servers
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/connect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index a30b080490e..79168612049 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2423,6 +2423,11 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon, 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; } |