diff options
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 873bf00d51a2..277dfaf2e99a 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -84,7 +84,7 @@ retry: | |||
84 | /* | 84 | /* |
85 | * Turn off NFSv4 uid/gid mapping when using AUTH_SYS | 85 | * Turn off NFSv4 uid/gid mapping when using AUTH_SYS |
86 | */ | 86 | */ |
87 | static int nfs4_disable_idmapping = 0; | 87 | static int nfs4_disable_idmapping = 1; |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * RPC cruft for NFS | 90 | * RPC cruft for NFS |
@@ -185,7 +185,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
185 | clp->cl_minorversion = cl_init->minorversion; | 185 | clp->cl_minorversion = cl_init->minorversion; |
186 | clp->cl_mvops = nfs_v4_minor_ops[cl_init->minorversion]; | 186 | clp->cl_mvops = nfs_v4_minor_ops[cl_init->minorversion]; |
187 | #endif | 187 | #endif |
188 | cred = rpc_lookup_machine_cred(); | 188 | cred = rpc_lookup_machine_cred("*"); |
189 | if (!IS_ERR(cred)) | 189 | if (!IS_ERR(cred)) |
190 | clp->cl_machine_cred = cred; | 190 | clp->cl_machine_cred = cred; |
191 | nfs_fscache_get_client_cookie(clp); | 191 | nfs_fscache_get_client_cookie(clp); |
@@ -250,6 +250,11 @@ static void pnfs_init_server(struct nfs_server *server) | |||
250 | rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC"); | 250 | rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC"); |
251 | } | 251 | } |
252 | 252 | ||
253 | static void nfs4_destroy_server(struct nfs_server *server) | ||
254 | { | ||
255 | nfs4_purge_state_owners(server); | ||
256 | } | ||
257 | |||
253 | #else | 258 | #else |
254 | static void nfs4_shutdown_client(struct nfs_client *clp) | 259 | static void nfs4_shutdown_client(struct nfs_client *clp) |
255 | { | 260 | { |
@@ -1065,6 +1070,7 @@ static struct nfs_server *nfs_alloc_server(void) | |||
1065 | INIT_LIST_HEAD(&server->master_link); | 1070 | INIT_LIST_HEAD(&server->master_link); |
1066 | INIT_LIST_HEAD(&server->delegations); | 1071 | INIT_LIST_HEAD(&server->delegations); |
1067 | INIT_LIST_HEAD(&server->layouts); | 1072 | INIT_LIST_HEAD(&server->layouts); |
1073 | INIT_LIST_HEAD(&server->state_owners_lru); | ||
1068 | 1074 | ||
1069 | atomic_set(&server->active, 0); | 1075 | atomic_set(&server->active, 0); |
1070 | 1076 | ||
@@ -1538,6 +1544,7 @@ static int nfs4_server_common_setup(struct nfs_server *server, | |||
1538 | 1544 | ||
1539 | nfs_server_insert_lists(server); | 1545 | nfs_server_insert_lists(server); |
1540 | server->mount_time = jiffies; | 1546 | server->mount_time = jiffies; |
1547 | server->destroy = nfs4_destroy_server; | ||
1541 | out: | 1548 | out: |
1542 | nfs_free_fattr(fattr); | 1549 | nfs_free_fattr(fattr); |
1543 | return error; | 1550 | return error; |
@@ -1719,6 +1726,7 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source, | |||
1719 | 1726 | ||
1720 | /* Copy data from the source */ | 1727 | /* Copy data from the source */ |
1721 | server->nfs_client = source->nfs_client; | 1728 | server->nfs_client = source->nfs_client; |
1729 | server->destroy = source->destroy; | ||
1722 | atomic_inc(&server->nfs_client->cl_count); | 1730 | atomic_inc(&server->nfs_client->cl_count); |
1723 | nfs_server_copy_userdata(server, source); | 1731 | nfs_server_copy_userdata(server, source); |
1724 | 1732 | ||