--- smb1ops.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/smb1ops.c b/smb1ops.c index 635b1e5..a12e370 100644 --- a/smb1ops.c +++ b/smb1ops.c @@ -540,11 +540,23 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, FILE_ALL_INFO *data, bool *adjustTZ) { int rc; + const int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; /* could do find first instead but this returns more info */ rc = CIFSSMBQPathInfo(xid, tcon, full_path, data, 0 /* not legacy */, - cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & - CIFS_MOUNT_MAP_SPECIAL_CHR); + cifs_sb->local_nls, remap); + + if (rc == -EIO) { + rc = CIFSSMBQPathInfoBasic(xid, tcon, full_path, + (FILE_BASIC_INFO*)data, + cifs_sb->local_nls, remap); + if (!rc) { + rc = CIFSSMBQPathInfoStandard(xid, tcon, full_path, + (void*)data + sizeof(FILE_BASIC_INFO), + cifs_sb->local_nls, remap); + } + } + /* * BB optimize code so we do not make the above call when server claims * no NT SMB support and the above call failed at least once - set flag @@ -552,9 +564,7 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, */ if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) { rc = SMBQueryInformation(xid, tcon, full_path, data, - cifs_sb->local_nls, - cifs_sb->mnt_cifs_flags & - CIFS_MOUNT_MAP_SPECIAL_CHR); + cifs_sb->local_nls, remap); *adjustTZ = true; } return rc; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html