Skip to content

Commit

Permalink
Enable dfs submounts to handle remote referrals.
Browse files Browse the repository at this point in the history
Having remote dfs root support in cifs_mount, we can
afford to pass into it UNC that is remote.

Signed-off-by: Igor Mammedov <niallain@gmail.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
imammedo authored and Steve French committed Apr 30, 2009
1 parent 20418ac commit 1af28ce
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions fs/cifs/cifs_dfs_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,27 +341,23 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)

for (i = 0; i < num_referrals; i++) {
dump_referral(referrals+i);
/* connect to a storage node */
if (referrals[i].flags & DFSREF_STORAGE_SERVER) {
int len;
len = strlen(referrals[i].node_name);
if (len < 2) {
cERROR(1, ("%s: Net Address path too short: %s",
/* connect to a node */
int len;
len = strlen(referrals[i].node_name);
if (len < 2) {
cERROR(1, ("%s: Net Address path too short: %s",
__func__, referrals[i].node_name));
rc = -EINVAL;
goto out_err;
}
mnt = cifs_dfs_do_refmount(nd->path.mnt,
nd->path.dentry,
referrals + i);
cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p",
__func__,
rc = -EINVAL;
goto out_err;
}
mnt = cifs_dfs_do_refmount(nd->path.mnt,
nd->path.dentry, referrals + i);
cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__,
referrals[i].node_name, mnt));

/* complete mount procedure if we accured submount */
if (!IS_ERR(mnt))
break;
}
/* complete mount procedure if we accured submount */
if (!IS_ERR(mnt))
break;
}

/* we need it cause for() above could exit without valid submount */
Expand Down

0 comments on commit 1af28ce

Please sign in to comment.