diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2016-12-15 10:01:19 +0300 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2016-12-15 10:42:54 +0300 |
commit | 374402a2a1dfbbee8ab1a5a32ec4887bf8c15d52 (patch) | |
tree | e886fc71908f5e2ac4c97b68e30e7b364417cfb2 /fs/cifs/cifsfs.c | |
parent | 395664439c4945e4827543e3ca80f7b74e1bf733 (diff) | |
download | linux-374402a2a1dfbbee8ab1a5a32ec4887bf8c15d52.tar.xz |
cifs_get_root shouldn't use path with tree name
When a server returns the optional flag SMB_SHARE_IS_IN_DFS in response
to a tree connect, cifs_build_path_to_root() will return a pathname
which includes the hostname. This causes problems with cifs_get_root()
which separates each component and does a lookup for each component of
the path which in this case will incorrectly include looking up the
hostname component as a path component.
We encountered a problem with dfs shares hosted by a Netapp. When
connecting to nodes pointed to by the DFS share. The tree connect for
these nodes return SMB_SHARE_IS_IN_DFS resulting failures in lookup
in cifs_get_root().
RH bz: 1373153
The patch was tested against a Netapp simulator and by a user using an
actual Netapp server.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reported-by: Pierguido Lambri <plambri@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 15261ba464c5..f135f088cdff 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -615,7 +615,7 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) return dget(sb->s_root); full_path = cifs_build_path_to_root(vol, cifs_sb, - cifs_sb_master_tcon(cifs_sb)); + cifs_sb_master_tcon(cifs_sb), 0); if (full_path == NULL) return ERR_PTR(-ENOMEM); |