summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-10-06 10:01:03 +0400
committerSteve French <smfrench@gmail.com>2014-10-17 00:20:20 +0400
commitb5b374eab11ef60d789e28bc36c18e2d08703212 (patch)
treea1cec103a742227ec12ff77b8f38f40cd9af23f6 /fs/cifs
parent2baa2682531ff02928e2d3904800696d9e7193db (diff)
downloadlinux-b5b374eab11ef60d789e28bc36c18e2d08703212.tar.xz
Workaround Mac server problem
Mac server returns that they support CIFS Unix Extensions but doesn't actually support QUERY_FILE_UNIX_BASIC so mount fails. Workaround this problem by disabling use of Unix CIFS protocol extensions if server returns an EOPNOTSUPP error on QUERY_FILE_UNIX_BASIC during mount. Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/inode.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index c23bdec805c5..197cb503d528 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -960,11 +960,18 @@ struct inode *cifs_root_iget(struct super_block *sb)
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
xid = get_xid();
- if (tcon->unix_ext)
+ if (tcon->unix_ext) {
rc = cifs_get_inode_info_unix(&inode, "", sb, xid);
- else
- rc = cifs_get_inode_info(&inode, "", NULL, sb, xid, NULL);
+ /* some servers mistakenly claim POSIX support */
+ if (rc != -EOPNOTSUPP)
+ goto iget_no_retry;
+ cifs_dbg(VFS, "server does not support POSIX extensions");
+ tcon->unix_ext = false;
+ }
+
+ rc = cifs_get_inode_info(&inode, "", NULL, sb, xid, NULL);
+iget_no_retry:
if (!inode) {
inode = ERR_PTR(rc);
goto out;