diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index d62e29fe91f2..fafdcdffba62 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -260,10 +260,15 @@ int cifs_open(struct inode *inode, struct file *file) | |||
260 | rc = -ENOMEM; | 260 | rc = -ENOMEM; |
261 | goto out; | 261 | goto out; |
262 | } | 262 | } |
263 | rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, | 263 | |
264 | CREATE_NOT_DIR, &netfid, &oplock, buf, | 264 | if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS) |
265 | rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, | ||
266 | desiredAccess, CREATE_NOT_DIR, &netfid, &oplock, buf, | ||
265 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags | 267 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags |
266 | & CIFS_MOUNT_MAP_SPECIAL_CHR); | 268 | & CIFS_MOUNT_MAP_SPECIAL_CHR); |
269 | else | ||
270 | rc = -EIO; /* no NT SMB support fall into legacy open below */ | ||
271 | |||
267 | if (rc == -EIO) { | 272 | if (rc == -EIO) { |
268 | /* Old server, try legacy style OpenX */ | 273 | /* Old server, try legacy style OpenX */ |
269 | rc = SMBLegacyOpen(xid, pTcon, full_path, disposition, | 274 | rc = SMBLegacyOpen(xid, pTcon, full_path, disposition, |