Merge branch 'for-3.3' of git://linux-nfs.org/~bfields/linux
* 'for-3.3' of git://linux-nfs.org/~bfields/linux: (31 commits) nfsd4: nfsd4_create_clid_dir return value is unused NFSD: Change name of extended attribute containing junction svcrpc: don't revert to SVC_POOL_DEFAULT on nfsd shutdown svcrpc: fix double-free on shutdown of nfsd after changing pool mode nfsd4: be forgiving in the absence of the recovery directory nfsd4: fix spurious 4.1 post-reboot failures NFSD: forget_delegations should use list_for_each_entry_safe NFSD: Only reinitilize the recall_lru list under the recall lock nfsd4: initialize special stateid's at compile time NFSd: use network-namespace-aware cache registering routines SUNRPC: create svc_xprt in proper network namespace svcrpc: update outdated BKL comment nfsd41: allow non-reclaim open-by-fh's in 4.1 svcrpc: avoid memory-corruption on pool shutdown svcrpc: destroy server sockets all at once svcrpc: make svc_delete_xprt static nfsd: Fix oops when parsing a 0 length export nfsd4: Use kmemdup rather than duplicating its implementation nfsd4: add a separate (lockowner, inode) lookup nfsd4: fix CONFIG_NFSD_FAULT_INJECTION compile error ...
This commit is contained in:
commit
0b48d42235
26 changed files with 626 additions and 171 deletions
|
@ -167,6 +167,7 @@ svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools)
|
|||
|
||||
fail_free:
|
||||
kfree(m->to_pool);
|
||||
m->to_pool = NULL;
|
||||
fail:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -285,9 +286,10 @@ svc_pool_map_put(void)
|
|||
mutex_lock(&svc_pool_map_mutex);
|
||||
|
||||
if (!--m->count) {
|
||||
m->mode = SVC_POOL_DEFAULT;
|
||||
kfree(m->to_pool);
|
||||
m->to_pool = NULL;
|
||||
kfree(m->pool_to);
|
||||
m->pool_to = NULL;
|
||||
m->npools = 0;
|
||||
}
|
||||
|
||||
|
@ -527,17 +529,20 @@ svc_destroy(struct svc_serv *serv)
|
|||
printk("svc_destroy: no threads for serv=%p!\n", serv);
|
||||
|
||||
del_timer_sync(&serv->sv_temptimer);
|
||||
|
||||
svc_close_all(&serv->sv_tempsocks);
|
||||
/*
|
||||
* The set of xprts (contained in the sv_tempsocks and
|
||||
* sv_permsocks lists) is now constant, since it is modified
|
||||
* only by accepting new sockets (done by service threads in
|
||||
* svc_recv) or aging old ones (done by sv_temptimer), or
|
||||
* configuration changes (excluded by whatever locking the
|
||||
* caller is using--nfsd_mutex in the case of nfsd). So it's
|
||||
* safe to traverse those lists and shut everything down:
|
||||
*/
|
||||
svc_close_all(serv);
|
||||
|
||||
if (serv->sv_shutdown)
|
||||
serv->sv_shutdown(serv);
|
||||
|
||||
svc_close_all(&serv->sv_permsocks);
|
||||
|
||||
BUG_ON(!list_empty(&serv->sv_permsocks));
|
||||
BUG_ON(!list_empty(&serv->sv_tempsocks));
|
||||
|
||||
cache_clean_deferred(serv);
|
||||
|
||||
if (svc_serv_is_pooled(serv))
|
||||
|
@ -683,8 +688,8 @@ found_pool:
|
|||
* Create or destroy enough new threads to make the number
|
||||
* of threads the given number. If `pool' is non-NULL, applies
|
||||
* only to threads in that pool, otherwise round-robins between
|
||||
* all pools. Must be called with a svc_get() reference and
|
||||
* the BKL or another lock to protect access to svc_serv fields.
|
||||
* all pools. Caller must ensure that mutual exclusion between this and
|
||||
* server startup or shutdown.
|
||||
*
|
||||
* Destroying threads relies on the service threads filling in
|
||||
* rqstp->rq_task, which only the nfs ones do. Assumes the serv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue