diff options
author | Igor Mammedov <niallain@gmail.com> | 2008-02-15 14:06:04 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-02-15 14:06:04 -0500 |
commit | 11b6d6450c10066e83e19f6ff57d55678c3e9f13 (patch) | |
tree | 579afbcdaaf2b0ff175e2fd2463ad562de227b3d | |
parent | 8aad018b6c1a0257b37cdf7c90cdbee2353150fd (diff) |
[CIFS] Only convert / when server does not support posix paths
Also add warning if posix path setting changes on reconnect
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/connect.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index e111c69139b7..77e6c4c3a88b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1722,8 +1722,15 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
1722 | originally at mount time */ | 1722 | originally at mount time */ |
1723 | if ((saved_cap & CIFS_UNIX_POSIX_ACL_CAP) == 0) | 1723 | if ((saved_cap & CIFS_UNIX_POSIX_ACL_CAP) == 0) |
1724 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; | 1724 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; |
1725 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) | 1725 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { |
1726 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | ||
1727 | cERROR(1, ("POSIXPATH support change")); | ||
1726 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; | 1728 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; |
1729 | } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { | ||
1730 | cERROR(1, ("possible reconnect error")); | ||
1731 | cERROR(1, | ||
1732 | ("server disabled POSIX path support")); | ||
1733 | } | ||
1727 | } | 1734 | } |
1728 | 1735 | ||
1729 | cap &= CIFS_UNIX_CAP_MASK; | 1736 | cap &= CIFS_UNIX_CAP_MASK; |
@@ -2243,7 +2250,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2243 | tcon->unix_ext = 0; /* server does not support them */ | 2250 | tcon->unix_ext = 0; /* server does not support them */ |
2244 | 2251 | ||
2245 | /* convert forward to back slashes in prepath here if needed */ | 2252 | /* convert forward to back slashes in prepath here if needed */ |
2246 | convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb)); | 2253 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0) |
2254 | convert_delimiter(cifs_sb->prepath, | ||
2255 | CIFS_DIR_SEP(cifs_sb)); | ||
2247 | 2256 | ||
2248 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { | 2257 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { |
2249 | cifs_sb->rsize = 1024 * 127; | 2258 | cifs_sb->rsize = 1024 * 127; |