The patch titled knfsd: lockd: Add nlm_destroy_host has been added to the -mm tree. Its filename is knfsd-lockd-add-nlm_destroy_host.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: knfsd: lockd: Add nlm_destroy_host From: Olaf Kirch <okir@xxxxxxx> This patch moves the host destruction code out of nlm_host_gc into a function of its own. Signed-off-by: Olaf Kirch <okir@xxxxxxx> Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/lockd/host.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff -puN fs/lockd/host.c~knfsd-lockd-add-nlm_destroy_host fs/lockd/host.c --- a/fs/lockd/host.c~knfsd-lockd-add-nlm_destroy_host +++ a/fs/lockd/host.c @@ -164,6 +164,34 @@ out: return host; } +/* + * Destroy a host + */ +static void +nlm_destroy_host(struct nlm_host *host) +{ + struct rpc_clnt *clnt; + + BUG_ON(!list_empty(&host->h_lockowners)); + BUG_ON(atomic_read(&host->h_count)); + + /* + * Release NSM handle and unmonitor host. + */ + nsm_unmonitor(host); + + if ((clnt = host->h_rpcclnt) != NULL) { + if (atomic_read(&clnt->cl_users)) { + printk(KERN_WARNING + "lockd: active RPC handle\n"); + clnt->cl_dead = 1; + } else { + rpc_destroy_client(host->h_rpcclnt); + } + } + kfree(host); +} + struct nlm_host * nlm_find_client(void) { @@ -400,7 +428,6 @@ nlm_gc_hosts(void) struct hlist_head *chain; struct hlist_node *pos, *next; struct nlm_host *host; - struct rpc_clnt *clnt; dprintk("lockd: host garbage collection\n"); for (chain = nlm_hosts; chain < nlm_hosts + NLM_HOST_NRHASH; ++chain) { @@ -423,21 +450,7 @@ nlm_gc_hosts(void) dprintk("lockd: delete host %s\n", host->h_name); hlist_del_init(&host->h_hash); - /* - * Unmonitor unless host was invalidated (i.e. lockd restarted) - */ - nsm_unmonitor(host); - - if ((clnt = host->h_rpcclnt) != NULL) { - if (atomic_read(&clnt->cl_users)) { - printk(KERN_WARNING - "lockd: active RPC handle\n"); - clnt->cl_dead = 1; - } else { - rpc_destroy_client(host->h_rpcclnt); - } - } - kfree(host); + nlm_destroy_host(host); nrhosts--; } } _ Patches currently in -mm which might be from okir@xxxxxxx are origin.patch ipmi-fix-occasional-oops-on-module-unload.patch knfsd-hide-use-of-lockds-h_monitored-flag.patch knfsd-consolidate-common-code-for-statd-lockd-notification.patch knfsd-when-looking-up-a-lockd-host-pass-hostname-length.patch knfsd-lockd-introduce-nsm_handle.patch knfsd-misc-minor-fixes-indentation-changes.patch knfsd-lockd-make-nlm_host_rebooted-use-the-nsm_handle.patch knfsd-lockd-make-the-nsm-upcalls-use-the-nsm_handle.patch knfsd-lockd-make-the-hash-chains-use-a-hlist_node.patch knfsd-lockd-change-list-of-blocked-list-to-list_node.patch knfsd-change-nlm_file-to-use-a-hlist.patch knfsd-lockd-make-nlm_traverse_-more-flexible.patch knfsd-lockd-add-nlm_destroy_host.patch knfsd-lockd-optionally-use-hostnames-for-identifying-peers.patch knfsd-make-nlmclnt_next_cookie-smp-safe.patch knfsd-match-granted_res-replies-using-cookies.patch knfsd-export-nsm_local_state-to-user-space-via-sysctl.patch knfsd-lockd-fix-use-of-h_nextrebind.patch knfsd-register-all-rpc-programs-with-portmapper-by-default.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html