Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c45d707f67b82236fcf9ca2af31c264669368b9b
Commit:     c45d707f67b82236fcf9ca2af31c264669368b9b
Parent:     5a07cdf86c1485b570789fb660c8ada7c2635b23
Author:     Steve French <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 17 02:04:21 2007 +0000
Committer:  Steve French <[EMAIL PROTECTED]>
CommitDate: Mon Sep 17 02:04:21 2007 +0000

    [CIFS] Fallback to standard mkdir if server incorrectly claims support for
    posix ops
    
    Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
 fs/cifs/cifsfs.h |    2 +-
 fs/cifs/inode.c  |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index dd64cec..13c53a4 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -101,5 +101,5 @@ extern ssize_t      cifs_getxattr(struct dentry *, const 
char *, void *, size_t);
 extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
 extern int cifs_ioctl(struct inode *inode, struct file *filep,
                       unsigned int command, unsigned long arg);
-#define CIFS_VERSION   "1.50"
+#define CIFS_VERSION   "1.51"
 #endif                         /* _CIFSFS_H */
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 9dffa93..552d68b 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -925,7 +925,10 @@ int cifs_mkdir(struct inode *inode, struct dentry 
*direntry, int mode)
                                full_path, cifs_sb->local_nls,
                                cifs_sb->mnt_cifs_flags &
                                        CIFS_MOUNT_MAP_SPECIAL_CHR);
-               if (rc) {
+               if (rc == -EOPNOTSUPP) {
+                       kfree(pInfo);
+                       goto mkdir_retry_old;
+               } else if (rc) {
                        cFYI(1, ("posix mkdir returned 0x%x", rc));
                        d_drop(direntry);
                } else {
@@ -977,7 +980,7 @@ int cifs_mkdir(struct inode *inode, struct dentry 
*direntry, int mode)
                kfree(pInfo);
                goto mkdir_out;
        }
-
+mkdir_retry_old:
        /* BB add setting the equivalent of mode via CreateX w/ACLs */
        rc = CIFSSMBMkDir(xid, pTcon, full_path, cifs_sb->local_nls,
                          cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to