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)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:41:42 +0000 (11:41 -0700)
commit3ec9852ea29f7aec9626b1e9bc6da40fb2d3eea8
treea4ec82da2c69e14b8852dcc5b9089e0c3ac68da4
parentab7c719e42f7613d4e148741bfc4b638eca76982
cifs: always do is_path_accessible check in cifs_mount

BugLink: http://bugs.launchpad.net/bugs/769042

commit 70945643722ffeac779d2529a348f99567fa5c33 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
fs/cifs/connect.c