diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-23 20:26:03 -0700 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-23 20:26:03 -0700 |
commit | 6b8edfe0f918e7585acb3bd63f62ff56e32dd3d2 (patch) | |
tree | ea9c6c9c85b0653aeac1abad87ad160114de28af /fs/cifs/inode.c | |
parent | a10faeb2a3e266385cc334fe9af76e08e5e4330f (diff) |
[CIFS] Support for mounting to older servers part 2. Add support for
legacy getattr (lookup).
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 2d50b3507d1..34f0168c404 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -215,8 +215,18 @@ int cifs_get_inode_info(struct inode **pinode, pfindData = (FILE_ALL_INFO *)buf; /* could do find first instead but this returns more info */ rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData, - cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & + cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); + /* 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 in tcon or mount */ + if((rc == -EOPNOTSUPP) || (rc == -EINVAL)) { + rc = SMBQueryInformation(xid, pTcon, search_path, + pfindData, cifs_sb->local_nls, + cifs_sb->mnt_cifs_flags & + CIFS_MOUNT_MAP_SPECIAL_CHR); + } + } /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ if (rc) { |