diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index d11cdaafb39a..27190337fc13 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -1063,6 +1063,10 @@ static int nfs4_init_server(struct nfs_server *server, | |||
1063 | nfs_init_timeout_values(&timeparms, data->nfs_server.protocol, | 1063 | nfs_init_timeout_values(&timeparms, data->nfs_server.protocol, |
1064 | data->timeo, data->retrans); | 1064 | data->timeo, data->retrans); |
1065 | 1065 | ||
1066 | /* Initialise the client representation from the mount data */ | ||
1067 | server->flags = data->flags; | ||
1068 | server->caps |= NFS_CAP_ATOMIC_OPEN; | ||
1069 | |||
1066 | /* Get a client record */ | 1070 | /* Get a client record */ |
1067 | error = nfs4_set_client(server, | 1071 | error = nfs4_set_client(server, |
1068 | data->nfs_server.hostname, | 1072 | data->nfs_server.hostname, |
@@ -1075,10 +1079,6 @@ static int nfs4_init_server(struct nfs_server *server, | |||
1075 | if (error < 0) | 1079 | if (error < 0) |
1076 | goto error; | 1080 | goto error; |
1077 | 1081 | ||
1078 | /* Initialise the client representation from the mount data */ | ||
1079 | server->flags = data->flags; | ||
1080 | server->caps |= NFS_CAP_ATOMIC_OPEN; | ||
1081 | |||
1082 | if (data->rsize) | 1082 | if (data->rsize) |
1083 | server->rsize = nfs_block_size(data->rsize, NULL); | 1083 | server->rsize = nfs_block_size(data->rsize, NULL); |
1084 | if (data->wsize) | 1084 | if (data->wsize) |
@@ -1181,6 +1181,10 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1181 | parent_server = NFS_SB(data->sb); | 1181 | parent_server = NFS_SB(data->sb); |
1182 | parent_client = parent_server->nfs_client; | 1182 | parent_client = parent_server->nfs_client; |
1183 | 1183 | ||
1184 | /* Initialise the client representation from the parent server */ | ||
1185 | nfs_server_copy_userdata(server, parent_server); | ||
1186 | server->caps |= NFS_CAP_ATOMIC_OPEN; | ||
1187 | |||
1184 | /* Get a client representation. | 1188 | /* Get a client representation. |
1185 | * Note: NFSv4 always uses TCP, */ | 1189 | * Note: NFSv4 always uses TCP, */ |
1186 | error = nfs4_set_client(server, data->hostname, | 1190 | error = nfs4_set_client(server, data->hostname, |
@@ -1193,10 +1197,6 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1193 | if (error < 0) | 1197 | if (error < 0) |
1194 | goto error; | 1198 | goto error; |
1195 | 1199 | ||
1196 | /* Initialise the client representation from the parent server */ | ||
1197 | nfs_server_copy_userdata(server, parent_server); | ||
1198 | server->caps |= NFS_CAP_ATOMIC_OPEN; | ||
1199 | |||
1200 | error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); | 1200 | error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); |
1201 | if (error < 0) | 1201 | if (error < 0) |
1202 | goto error; | 1202 | goto error; |