]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cifs: always do is_path_accessible check in cifs_mount
authorJeff Layton <jlayton@redhat.com>
Mon, 14 Mar 2011 17:48:08 +0000 (13:48 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 12 Apr 2011 00:52:08 +0000 (00:52 +0000)
Currently, we skip doing the is_path_accessible check in cifs_mount if
there is no prefixpath. I have a report of at least one server however
that allows a TREE_CONNECT to a share that has a DFS referral at its
root. The reporter in this case was using a UNC that had no prefixpath,
so the is_path_accessible check was not triggered and the box later hit
a BUG() because we were chasing a DFS referral on the root dentry for
the mount.

This patch fixes this by removing the check for a zero-length
prefixpath.  That should make the is_path_accessible check be done in
this situation and should allow the client to chase the DFS referral at
mount time instead.

Cc: stable@kernel.org
Reported-and-Tested-by: Yogesh Sharma <ysharma@cymer.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index 94a05a681f841945cd8adf021250c14ee0413617..5eacb89d4a4f9af0c0bf3676e6cdc7c6640d53b1 100644 (file)
@@ -2831,7 +2831,7 @@ try_mount_again:
 
 remote_path_check:
        /* check if a whole path (including prepath) is not remote */
-       if (!rc && cifs_sb->prepathlen && tcon) {
+       if (!rc && tcon) {
                /* build_path_to_root works only when we have a valid tcon */
                full_path = cifs_build_path_to_root(cifs_sb, tcon);
                if (full_path == NULL) {