Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d801b861681116ea23a7fb87a70bf463d29c8b9c
Commit:     d801b861681116ea23a7fb87a70bf463d29c8b9c
Parent:     0113ab34644649aceaac37ef4b7e5c7d5c183be3
Author:     Jeff Layton <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 29 10:30:55 2008 -0500
Committer:  J. Bruce Fields <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 16:42:15 2008 -0500

    NLM: tear down RPC clients in nlm_shutdown_hosts
    
    It's possible for a RPC to outlive the lockd daemon that created it, so
    we need to make sure that all RPC's are killed when lockd is coming
    down. When nlm_shutdown_hosts is called, kill off all RPC tasks
    associated with the host. Since we need to wait until they have all gone
    away, we might as well just shut down the RPC client altogether.
    
    Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
    Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
---
 fs/lockd/host.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index ebec009..ca6b16f 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -379,8 +379,13 @@ nlm_shutdown_hosts(void)
        /* First, make all hosts eligible for gc */
        dprintk("lockd: nuking all hosts...\n");
        for (chain = nlm_hosts; chain < nlm_hosts + NLM_HOST_NRHASH; ++chain) {
-               hlist_for_each_entry(host, pos, chain, h_hash)
+               hlist_for_each_entry(host, pos, chain, h_hash) {
                        host->h_expires = jiffies - 1;
+                       if (host->h_rpcclnt) {
+                               rpc_shutdown_client(host->h_rpcclnt);
+                               host->h_rpcclnt = NULL;
+                       }
+               }
        }
 
        /* Then, perform a garbage collection pass */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to