Commit 1af28ceb authored by Igor Mammedov's avatar Igor Mammedov Committed by Steve French

Enable dfs submounts to handle remote referrals.

Having remote dfs root support in cifs_mount, we can
afford to pass into it UNC that is remote.
Signed-off-by: default avatarIgor Mammedov <niallain@gmail.com>
Acked-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 20418acd
...@@ -341,8 +341,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) ...@@ -341,8 +341,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
for (i = 0; i < num_referrals; i++) { for (i = 0; i < num_referrals; i++) {
dump_referral(referrals+i); dump_referral(referrals+i);
/* connect to a storage node */ /* connect to a node */
if (referrals[i].flags & DFSREF_STORAGE_SERVER) {
int len; int len;
len = strlen(referrals[i].node_name); len = strlen(referrals[i].node_name);
if (len < 2) { if (len < 2) {
...@@ -352,17 +351,14 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) ...@@ -352,17 +351,14 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
goto out_err; goto out_err;
} }
mnt = cifs_dfs_do_refmount(nd->path.mnt, mnt = cifs_dfs_do_refmount(nd->path.mnt,
nd->path.dentry, nd->path.dentry, referrals + i);
referrals + i); cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__,
cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p",
__func__,
referrals[i].node_name, mnt)); referrals[i].node_name, mnt));
/* complete mount procedure if we accured submount */ /* complete mount procedure if we accured submount */
if (!IS_ERR(mnt)) if (!IS_ERR(mnt))
break; break;
} }
}
/* we need it cause for() above could exit without valid submount */ /* we need it cause for() above could exit without valid submount */
rc = PTR_ERR(mnt); rc = PTR_ERR(mnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment