[CIFS] Add support for readdir to legacy servers
Fixes oops to OS/2 on ls and removes redundant NTCreateX calls to servers which do not support NT SMBs. Key operations to OS/2 work. Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
@@ -260,10 +260,15 @@ int cifs_open(struct inode *inode, struct file *file)
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess,
|
||||
CREATE_NOT_DIR, &netfid, &oplock, buf,
|
||||
|
||||
if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
|
||||
rc = CIFSSMBOpen(xid, pTcon, full_path, disposition,
|
||||
desiredAccess, CREATE_NOT_DIR, &netfid, &oplock, buf,
|
||||
cifs_sb->local_nls, cifs_sb->mnt_cifs_flags
|
||||
& CIFS_MOUNT_MAP_SPECIAL_CHR);
|
||||
else
|
||||
rc = -EIO; /* no NT SMB support fall into legacy open below */
|
||||
|
||||
if (rc == -EIO) {
|
||||
/* Old server, try legacy style OpenX */
|
||||
rc = SMBLegacyOpen(xid, pTcon, full_path, disposition,
|
||||
|
Reference in New Issue
Block a user