]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: remove blocked locks on client teardown
authorJeff Layton <jlayton@redhat.com>
Fri, 16 Mar 2018 15:32:02 +0000 (11:32 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 19 Mar 2018 20:37:21 +0000 (16:37 -0400)
commit319039cde92b544c30779f8015bf76300662d44d
tree403d19d2d65cd69779143dc51cb0efbd78ce15c9
parentec86ef94f7e7b4fb720bc80e7ffb57326f152ab0
nfsd: remove blocked locks on client teardown

We had some reports of panics in nfsd4_lm_notify, and that showed a
nfs4_lockowner that had outlived its so_client.

Ensure that we walk any leftover lockowners after tearing down all of
the stateids, and remove any blocked locks that they hold.

With this change, we also don't need to walk the nbl_lru on nfsd_net
shutdown, as that will happen naturally when we tear down the clients.

Fixes: 0abe867b7b82 (nfsd: have nfsd4_lock use blocking locks for v4.1+ locks)
Reported-by: Frank Sorenson <fsorenso@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: stable@vger.kernel.org # 4.9
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c