Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201727
b: refs/heads/master
c: f67909c
h: refs/heads/master
i:
  201725: eb65587
  201723: 7d4e3e2
  201719: 1bd76c2
  201711: 4c33f31
  201695: 96c4f83
  201663: af45f77
  201599: 1262ccb
  201471: a90e296
  201215: c63d122
  200703: 6a55196
v: v3
  • Loading branch information
Steve French committed Aug 2, 2010
1 parent e3e7c07 commit bce1f8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f636a34802e3913415410c6e595df2bf84851cff
refs/heads/master: f67909cf80051e8510194a51f88c4de323b92071
28 changes: 11 additions & 17 deletions trunk/fs/cifs/cifs_dfs_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,28 +230,22 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
goto compose_mount_options_out;
}


static struct vfsmount *cifs_dfs_do_refmount(const struct vfsmount *mnt_parent,
struct dentry *dentry, const struct dfs_info3_param *ref)
/**
* cifs_dfs_do_refmount - mounts specified path using provided refferal
* @cifs_sb: parent/root superblock
* @fullpath: full path in UNC format
* @ref: server's referral
*/
static struct vfsmount *cifs_dfs_do_refmount(struct cifs_sb_info *cifs_sb,
const char *fullpath, const struct dfs_info3_param *ref)
{
struct cifs_sb_info *cifs_sb;
struct vfsmount *mnt;
char *mountdata;
char *devname = NULL;
char *fullpath;

cifs_sb = CIFS_SB(dentry->d_inode->i_sb);
/*
* this function gives us a path with a double backslash prefix. We
* require a single backslash for DFS.
*/
fullpath = build_path_from_dentry(dentry);
if (!fullpath)
return ERR_PTR(-ENOMEM);

/* strip first '\' from fullpath */
mountdata = cifs_compose_mount_options(cifs_sb->mountdata,
fullpath + 1, ref, &devname);
kfree(fullpath);

if (IS_ERR(mountdata))
return (struct vfsmount *)mountdata;
Expand Down Expand Up @@ -357,8 +351,8 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
rc = -EINVAL;
goto out_err;
}
mnt = cifs_dfs_do_refmount(nd->path.mnt,
nd->path.dentry, referrals + i);
mnt = cifs_dfs_do_refmount(cifs_sb,
full_path, referrals + i);
cFYI(1, "%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__,
referrals[i].node_name, mnt);

Expand Down

0 comments on commit bce1f8f

Please sign in to comment.