diff options
author | Steve French <sfrench@us.ibm.com> | 2006-06-07 00:18:43 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-06-07 00:18:43 +0000 |
commit | 5bafd76593f060540acbea3b61e3087e009aa269 (patch) | |
tree | b5baf62243810b7aa36619a8cf64ab24d82952fb /fs/cifs/dir.c | |
parent | a8ee03441f66e0674e641c0cbe1a9534cdee968f (diff) | |
download | linux-5bafd76593f060540acbea3b61e3087e009aa269.tar.bz2 |
[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>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e6ed64e94b7b..ba4cbe9b0684 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -178,11 +178,14 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, FreeXid(xid); return -ENOMEM; } - - rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, + if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS) + rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, CREATE_NOT_DIR, &fileHandle, &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, retry the open legacy style */ rc = SMBLegacyOpen(xid, pTcon, full_path, disposition, @@ -369,6 +372,10 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); + /* BB FIXME - add handling for backlevel servers + which need legacy open and check for all + calls to SMBOpen for fallback to + SMBLeagcyOpen */ if(!rc) { /* BB Do not bother to decode buf since no local inode yet to put timestamps in, |