diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-03-14 13:48:08 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-11 20:52:08 -0400 |
commit | 70945643722ffeac779d2529a348f99567fa5c33 (patch) | |
tree | 8dd3beff7efb653d6cff8836fbae686d472b5499 | |
parent | 5443d130aa4990424a8e64984e64b50ec70661bb (diff) |
cifs: always do is_path_accessible check in cifs_mount
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>
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 94a05a681f84..5eacb89d4a4f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2831,7 +2831,7 @@ try_mount_again: | |||
2831 | 2831 | ||
2832 | remote_path_check: | 2832 | remote_path_check: |
2833 | /* check if a whole path (including prepath) is not remote */ | 2833 | /* check if a whole path (including prepath) is not remote */ |
2834 | if (!rc && cifs_sb->prepathlen && tcon) { | 2834 | if (!rc && tcon) { |
2835 | /* build_path_to_root works only when we have a valid tcon */ | 2835 | /* build_path_to_root works only when we have a valid tcon */ |
2836 | full_path = cifs_build_path_to_root(cifs_sb, tcon); | 2836 | full_path = cifs_build_path_to_root(cifs_sb, tcon); |
2837 | if (full_path == NULL) { | 2837 | if (full_path == NULL) { |