Skip to content

Commit bfca7a6

Browse files
jtlaytonchucklever
authored andcommitted
lockd: purge resources held on behalf of nlm clients when shutting down
It's easily possible for the server to have an outstanding lock when we go to shut down. When that happens, we often get a warning like this in the kernel log: lockd: couldn't shutdown host module for net f0000000! This is because the shutdown procedures skip removing any hosts that still have outstanding resources (locks). Eventually, things seem to get cleaned up anyway, but the log message is unsettling, and server shutdown doesn't seem to be working the way it was intended. Ensure that we tear down any resources held on behalf of a client when tearing one down for server shutdown. Reported-by: Yongcheng Yang <[email protected]> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2063818 Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent c4c649a commit bfca7a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/lockd/host.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ nlm_shutdown_hosts_net(struct net *net)
629629
rpc_shutdown_client(host->h_rpcclnt);
630630
host->h_rpcclnt = NULL;
631631
}
632+
nlmsvc_free_host_resources(host);
632633
}
633634

634635
/* Then, perform a garbage collection pass */

0 commit comments

Comments
 (0)