diff options
author | Steve French <sfrench@us.ibm.com> | 2010-10-08 03:42:03 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-08 03:42:03 +0000 |
commit | 6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2 (patch) | |
tree | 66cf5e73830d2730866f7e6bf6cf93f0684c5b99 /fs/cifs/cifs_dfs_ref.c | |
parent | 6b0cd00bc396daf5c2dcf17a8d82055335341f46 (diff) | |
parent | d2445556137c38ae15d3191174bfd235630ed7cd (diff) | |
download | op-kernel-dev-6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2.zip op-kernel-dev-6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2.tar.gz |
Merge branch 'for-next'
Diffstat (limited to 'fs/cifs/cifs_dfs_ref.c')
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index d6ced7a..f4aab6f 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -306,6 +306,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) int xid, i; int rc = 0; struct vfsmount *mnt = ERR_PTR(-ENOENT); + struct tcon_link *tlink; cFYI(1, "in %s", __func__); BUG_ON(IS_ROOT(dentry)); @@ -315,14 +316,6 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) dput(nd->path.dentry); nd->path.dentry = dget(dentry); - cifs_sb = CIFS_SB(dentry->d_inode->i_sb); - ses = cifs_sb->tcon->ses; - - if (!ses) { - rc = -EINVAL; - goto out_err; - } - /* * The MSDFS spec states that paths in DFS referral requests and * responses must be prefixed by a single '\' character instead of @@ -335,10 +328,20 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) goto out_err; } - rc = get_dfs_path(xid, ses , full_path + 1, cifs_sb->local_nls, + cifs_sb = CIFS_SB(dentry->d_inode->i_sb); + tlink = cifs_sb_tlink(cifs_sb); + if (IS_ERR(tlink)) { + rc = PTR_ERR(tlink); + goto out_err; + } + ses = tlink_tcon(tlink)->ses; + + rc = get_dfs_path(xid, ses, full_path + 1, cifs_sb->local_nls, &num_referrals, &referrals, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); + cifs_put_tlink(tlink); + for (i = 0; i < num_referrals; i++) { int len; dump_referral(referrals+i); |