Skip to content

Commit

Permalink
Workaround Mac server problem
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
smfrench committed Oct 16, 2014
1 parent 2baa268 commit b5b374e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b5b374e

Please sign in to comment.