NFS: Let mount data parsing set the NFS version
This field is unconditionally set while parsing mount data, so there is no need to fill it in here. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
21e4b82e13
commit
db83335191
1 changed files with 3 additions and 4 deletions
|
@ -945,7 +945,7 @@ static void nfs_umount_begin(struct super_block *sb)
|
||||||
rpc_killall_tasks(rpc);
|
rpc_killall_tasks(rpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int version)
|
static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void)
|
||||||
{
|
{
|
||||||
struct nfs_parsed_mount_data *data;
|
struct nfs_parsed_mount_data *data;
|
||||||
|
|
||||||
|
@ -960,7 +960,6 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve
|
||||||
data->nfs_server.protocol = XPRT_TRANSPORT_TCP;
|
data->nfs_server.protocol = XPRT_TRANSPORT_TCP;
|
||||||
data->auth_flavors[0] = RPC_AUTH_UNIX;
|
data->auth_flavors[0] = RPC_AUTH_UNIX;
|
||||||
data->auth_flavor_len = 1;
|
data->auth_flavor_len = 1;
|
||||||
data->version = version;
|
|
||||||
data->minorversion = 0;
|
data->minorversion = 0;
|
||||||
data->net = current->nsproxy->net_ns;
|
data->net = current->nsproxy->net_ns;
|
||||||
security_init_mnt_opts(&data->lsm_opts);
|
security_init_mnt_opts(&data->lsm_opts);
|
||||||
|
@ -2416,7 +2415,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
|
||||||
struct dentry *mntroot = ERR_PTR(-ENOMEM);
|
struct dentry *mntroot = ERR_PTR(-ENOMEM);
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION);
|
data = nfs_alloc_parsed_mount_data();
|
||||||
mntfh = nfs_alloc_fhandle();
|
mntfh = nfs_alloc_fhandle();
|
||||||
if (data == NULL || mntfh == NULL)
|
if (data == NULL || mntfh == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -2867,7 +2866,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type,
|
||||||
int error = -ENOMEM;
|
int error = -ENOMEM;
|
||||||
struct dentry *res = ERR_PTR(-ENOMEM);
|
struct dentry *res = ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
data = nfs_alloc_parsed_mount_data(4);
|
data = nfs_alloc_parsed_mount_data();
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue