Commit 4deb0759 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French

cifs: remove the devname argument to cifs_compose_mount_options

none of the callers use this argument any more.
Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 24e0a1ef
...@@ -124,7 +124,6 @@ cifs_build_devname(char *nodename, const char *prepath) ...@@ -124,7 +124,6 @@ cifs_build_devname(char *nodename, const char *prepath)
* @sb_mountdata: parent/root DFS mount options (template) * @sb_mountdata: parent/root DFS mount options (template)
* @fullpath: full path in UNC format * @fullpath: full path in UNC format
* @ref: optional server's referral * @ref: optional server's referral
* @devname: optional pointer for saving device name
* *
* creates mount options for submount based on template options sb_mountdata * creates mount options for submount based on template options sb_mountdata
* and replacing unc,ip,prefixpath options with ones we've got form ref_unc. * and replacing unc,ip,prefixpath options with ones we've got form ref_unc.
...@@ -134,8 +133,7 @@ cifs_build_devname(char *nodename, const char *prepath) ...@@ -134,8 +133,7 @@ cifs_build_devname(char *nodename, const char *prepath)
*/ */
char *cifs_compose_mount_options(const char *sb_mountdata, char *cifs_compose_mount_options(const char *sb_mountdata,
const char *fullpath, const char *fullpath,
const struct dfs_info3_param *ref, const struct dfs_info3_param *ref)
char **devname)
{ {
int rc; int rc;
char *name; char *name;
...@@ -232,9 +230,6 @@ char *cifs_compose_mount_options(const char *sb_mountdata, ...@@ -232,9 +230,6 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
strcat(mountdata, "ip="); strcat(mountdata, "ip=");
strcat(mountdata, srvIP); strcat(mountdata, srvIP);
if (devname)
*devname = name;
else
kfree(name); kfree(name);
/*cifs_dbg(FYI, "%s: parent mountdata: %s\n", __func__, sb_mountdata);*/ /*cifs_dbg(FYI, "%s: parent mountdata: %s\n", __func__, sb_mountdata);*/
...@@ -281,7 +276,7 @@ static struct vfsmount *cifs_dfs_do_mount(struct dentry *mntpt, ...@@ -281,7 +276,7 @@ static struct vfsmount *cifs_dfs_do_mount(struct dentry *mntpt,
/* strip first '\' from fullpath */ /* strip first '\' from fullpath */
mountdata = cifs_compose_mount_options(cifs_sb->mountdata, mountdata = cifs_compose_mount_options(cifs_sb->mountdata,
fullpath + 1, NULL, NULL); fullpath + 1, NULL);
if (IS_ERR(mountdata)) { if (IS_ERR(mountdata)) {
kfree(devname); kfree(devname);
return (struct vfsmount *)mountdata; return (struct vfsmount *)mountdata;
......
...@@ -78,8 +78,7 @@ extern char *cifs_build_path_to_root(struct smb3_fs_context *ctx, ...@@ -78,8 +78,7 @@ extern char *cifs_build_path_to_root(struct smb3_fs_context *ctx,
int add_treename); int add_treename);
extern char *build_wildcard_path_from_dentry(struct dentry *direntry); extern char *build_wildcard_path_from_dentry(struct dentry *direntry);
extern char *cifs_compose_mount_options(const char *sb_mountdata, extern char *cifs_compose_mount_options(const char *sb_mountdata,
const char *fullpath, const struct dfs_info3_param *ref, const char *fullpath, const struct dfs_info3_param *ref);
char **devname);
/* extern void renew_parental_timestamps(struct dentry *direntry);*/ /* extern void renew_parental_timestamps(struct dentry *direntry);*/
extern struct mid_q_entry *AllocMidQEntry(const struct smb_hdr *smb_buffer, extern struct mid_q_entry *AllocMidQEntry(const struct smb_hdr *smb_buffer,
struct TCP_Server_Info *server); struct TCP_Server_Info *server);
......
...@@ -3032,11 +3032,8 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses, ...@@ -3032,11 +3032,8 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
rc = dfs_cache_find(xid, ses, cifs_sb->local_nls, cifs_remap(cifs_sb), rc = dfs_cache_find(xid, ses, cifs_sb->local_nls, cifs_remap(cifs_sb),
ref_path, &referral, NULL); ref_path, &referral, NULL);
if (!rc) { if (!rc) {
char *fake_devname = NULL;
mdata = cifs_compose_mount_options(cifs_sb->mountdata, mdata = cifs_compose_mount_options(cifs_sb->mountdata,
full_path + 1, &referral, full_path + 1, &referral);
&fake_devname);
free_dfs_info_param(&referral); free_dfs_info_param(&referral);
if (IS_ERR(mdata)) { if (IS_ERR(mdata)) {
...@@ -3046,7 +3043,6 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses, ...@@ -3046,7 +3043,6 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
cifs_cleanup_volume_info_contents(ctx); cifs_cleanup_volume_info_contents(ctx);
rc = cifs_setup_volume_info(ctx); rc = cifs_setup_volume_info(ctx);
} }
kfree(fake_devname);
kfree(cifs_sb->mountdata); kfree(cifs_sb->mountdata);
cifs_sb->mountdata = mdata; cifs_sb->mountdata = mdata;
} }
...@@ -3098,7 +3094,7 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path, ...@@ -3098,7 +3094,7 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path,
{ {
int rc; int rc;
struct dfs_info3_param ref = {0}; struct dfs_info3_param ref = {0};
char *mdata = NULL, *fake_devname = NULL; char *mdata = NULL;
struct smb3_fs_context fake_ctx = {NULL}; struct smb3_fs_context fake_ctx = {NULL};
cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path); cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path);
...@@ -3107,7 +3103,7 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path, ...@@ -3107,7 +3103,7 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path,
if (rc) if (rc)
return rc; return rc;
mdata = cifs_compose_mount_options(cifs_sb->mountdata, full_path + 1, &ref, &fake_devname); mdata = cifs_compose_mount_options(cifs_sb->mountdata, full_path + 1, &ref);
free_dfs_info_param(&ref); free_dfs_info_param(&ref);
if (IS_ERR(mdata)) { if (IS_ERR(mdata)) {
...@@ -3117,7 +3113,6 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path, ...@@ -3117,7 +3113,6 @@ static int setup_dfs_tgt_conn(const char *path, const char *full_path,
rc = cifs_setup_volume_info(&fake_ctx); rc = cifs_setup_volume_info(&fake_ctx);
kfree(mdata); kfree(mdata);
kfree(fake_devname);
if (!rc) { if (!rc) {
/* /*
......
...@@ -1416,7 +1416,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi, ...@@ -1416,7 +1416,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
int rc; int rc;
struct cache_entry *ce; struct cache_entry *ce;
struct dfs_info3_param ref = {0}; struct dfs_info3_param ref = {0};
char *mdata = NULL, *devname = NULL; char *mdata = NULL;
struct TCP_Server_Info *server; struct TCP_Server_Info *server;
struct cifs_ses *ses; struct cifs_ses *ses;
struct smb3_fs_context ctx = {NULL}; struct smb3_fs_context ctx = {NULL};
...@@ -1443,8 +1443,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi, ...@@ -1443,8 +1443,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
up_read(&htable_rw_lock); up_read(&htable_rw_lock);
mdata = cifs_compose_mount_options(vi->mntdata, rpath, &ref, mdata = cifs_compose_mount_options(vi->mntdata, rpath, &ref);
&devname);
free_dfs_info_param(&ref); free_dfs_info_param(&ref);
if (IS_ERR(mdata)) { if (IS_ERR(mdata)) {
...@@ -1454,7 +1453,6 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi, ...@@ -1454,7 +1453,6 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
} }
rc = cifs_setup_volume_info(&ctx); rc = cifs_setup_volume_info(&ctx);
kfree(devname);
if (rc) { if (rc) {
ses = ERR_PTR(rc); ses = ERR_PTR(rc);
......
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