diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-05-10 15:07:38 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-14 20:30:29 -0400 |
commit | db8333519187d5974cf2ff33910c893bf8727d9f (patch) | |
tree | fbe1f658ffcb224332e7f2add2950853bb5deb5d /fs/nfs/super.c | |
parent | 21e4b82e13c038457b4fa4d54d988c9f1865bcf6 (diff) |
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>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 1157189b4d49..db0952de67d9 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -945,7 +945,7 @@ static void nfs_umount_begin(struct super_block *sb) | |||
945 | rpc_killall_tasks(rpc); | 945 | rpc_killall_tasks(rpc); |
946 | } | 946 | } |
947 | 947 | ||
948 | static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int version) | 948 | static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void) |
949 | { | 949 | { |
950 | struct nfs_parsed_mount_data *data; | 950 | struct nfs_parsed_mount_data *data; |
951 | 951 | ||
@@ -960,7 +960,6 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve | |||
960 | data->nfs_server.protocol = XPRT_TRANSPORT_TCP; | 960 | data->nfs_server.protocol = XPRT_TRANSPORT_TCP; |
961 | data->auth_flavors[0] = RPC_AUTH_UNIX; | 961 | data->auth_flavors[0] = RPC_AUTH_UNIX; |
962 | data->auth_flavor_len = 1; | 962 | data->auth_flavor_len = 1; |
963 | data->version = version; | ||
964 | data->minorversion = 0; | 963 | data->minorversion = 0; |
965 | data->net = current->nsproxy->net_ns; | 964 | data->net = current->nsproxy->net_ns; |
966 | security_init_mnt_opts(&data->lsm_opts); | 965 | security_init_mnt_opts(&data->lsm_opts); |
@@ -2416,7 +2415,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | |||
2416 | struct dentry *mntroot = ERR_PTR(-ENOMEM); | 2415 | struct dentry *mntroot = ERR_PTR(-ENOMEM); |
2417 | int error; | 2416 | int error; |
2418 | 2417 | ||
2419 | data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION); | 2418 | data = nfs_alloc_parsed_mount_data(); |
2420 | mntfh = nfs_alloc_fhandle(); | 2419 | mntfh = nfs_alloc_fhandle(); |
2421 | if (data == NULL || mntfh == NULL) | 2420 | if (data == NULL || mntfh == NULL) |
2422 | goto out; | 2421 | goto out; |
@@ -2867,7 +2866,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type, | |||
2867 | int error = -ENOMEM; | 2866 | int error = -ENOMEM; |
2868 | struct dentry *res = ERR_PTR(-ENOMEM); | 2867 | struct dentry *res = ERR_PTR(-ENOMEM); |
2869 | 2868 | ||
2870 | data = nfs_alloc_parsed_mount_data(4); | 2869 | data = nfs_alloc_parsed_mount_data(); |
2871 | if (data == NULL) | 2870 | if (data == NULL) |
2872 | goto out; | 2871 | goto out; |
2873 | 2872 | ||