]> err.no Git - linux-2.6/blobdiff - fs/cifs/connect.c
trivial: fix user-visible typo in hfsplus
[linux-2.6] / fs / cifs / connect.c
index e111c69139b7e7d602b5a33d4927cb5b1ededc17..e171067301689dee90ed97de96fc2fcb7eb3f518 100644 (file)
@@ -1722,8 +1722,15 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon,
                           originally at mount time */
                        if ((saved_cap & CIFS_UNIX_POSIX_ACL_CAP) == 0)
                                cap &= ~CIFS_UNIX_POSIX_ACL_CAP;
-                       if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0)
+                       if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) {
+                               if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP)
+                                       cERROR(1, ("POSIXPATH support change"));
                                cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP;
+                       } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) {
+                               cERROR(1, ("possible reconnect error"));
+                               cERROR(1,
+                                       ("server disabled POSIX path support"));
+                       }
                }
 
                cap &= CIFS_UNIX_CAP_MASK;
@@ -1795,12 +1802,18 @@ static void
 convert_delimiter(char *path, char delim)
 {
        int i;
+       char old_delim;
 
        if (path == NULL)
                return;
 
+       if (delim == '/') 
+               old_delim = '\\';
+       else
+               old_delim = '/';
+
        for (i = 0; path[i] != '\0'; i++) {
-               if ((path[i] == '/') || (path[i] == '\\'))
+               if (path[i] == old_delim)
                        path[i] = delim;
        }
 }
@@ -2243,7 +2256,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
                        tcon->unix_ext = 0; /* server does not support them */
 
                /* convert forward to back slashes in prepath here if needed */
-               convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
+               if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
+                       convert_delimiter(cifs_sb->prepath,
+                                         CIFS_DIR_SEP(cifs_sb));
 
                if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
                        cifs_sb->rsize = 1024 * 127;
@@ -3512,6 +3527,7 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
                        FreeXid(xid);
                        return 0;
                }
+               DeleteTconOplockQEntries(cifs_sb->tcon);
                tconInfoFree(cifs_sb->tcon);
                if ((ses) && (ses->server)) {
                        /* save off task so we do not refer to ses later */