diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-19 02:44:07 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-19 02:44:07 -0500 |
commit | 9937347a1ee6a67e450cc9e90750ce0b10abfe75 (patch) | |
tree | 051923a6fd655fb0dc0be0b90f7de117575a91a2 /fs/nfs/super.c | |
parent | 0a702195234eb77c4097148285cccf7f095de9cf (diff) |
NFS: Ensure that the nfs_client 'net' field is always set
Currently, the nfs_parsed_mount_data->net field is initialised in
the nfs_parse_mount_options() function, which means that it only
gets set if we're using text based mounts. The legacy binary
mount interface is therefore broken.
Fix is to initialise the ->net field in nfs_alloc_parsed_mount_data.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index d05024a18984..6708f3044eb0 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -911,6 +911,7 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve | |||
911 | data->auth_flavor_len = 1; | 911 | data->auth_flavor_len = 1; |
912 | data->version = version; | 912 | data->version = version; |
913 | data->minorversion = 0; | 913 | data->minorversion = 0; |
914 | data->net = current->nsproxy->net_ns; | ||
914 | security_init_mnt_opts(&data->lsm_opts); | 915 | security_init_mnt_opts(&data->lsm_opts); |
915 | } | 916 | } |
916 | return data; | 917 | return data; |
@@ -1110,8 +1111,6 @@ static int nfs_parse_mount_options(char *raw, | |||
1110 | 1111 | ||
1111 | free_secdata(secdata); | 1112 | free_secdata(secdata); |
1112 | 1113 | ||
1113 | mnt->net = current->nsproxy->net_ns; | ||
1114 | |||
1115 | while ((p = strsep(&raw, ",")) != NULL) { | 1114 | while ((p = strsep(&raw, ",")) != NULL) { |
1116 | substring_t args[MAX_OPT_ARGS]; | 1115 | substring_t args[MAX_OPT_ARGS]; |
1117 | unsigned long option; | 1116 | unsigned long option; |