Correctly close old nfsd/lockd sockets.
Subsystems (3)
PATCH 1/1 Correctly close old nfsd/lockd sockets.
From: Neil Brown <[email protected]>
Commit aaf68cfbf2241d24d46583423f6bff5c47e088b3 added a bias to sk_inuse, so this test for an unused socket now fails. So no sockets get closed because they are old (they might get closed if the client closed them).
This bug has existed since 2.6.21-rc1.
Thanks to Wolfgang Walter for finding and reporting the bug.
Cc Wolfgang Walter <[email protected]>
Signed-off-by Neil Brown <[email protected]>
Signed-off-by J. Bruce Fields <[email protected]>
--- net/sunrpc/svcsock.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
This looks appropriate for both 2.6.23 and 2.6.22.x.
net/sunrpc/svcsock.c +2 -1
@@ -1593,7 +1593,8 @@ svc_age_temp_sockets(unsigned long closure)if (!test_and_set_bit (SK_OLD , &svsk->sk_flags))continue ; -if (atomic_read (&svsk->sk_inuse) ||test_bit (SK_BUSY , &svsk->sk_flags)) +if (atomic_read (&svsk->sk_inuse) >1 + ||test_bit (SK_BUSY , &svsk->sk_flags))continue ;atomic_inc (&svsk->sk_inuse);list_move (le, &to_be_aged);
Signature · 10 lines
1.5.3.1.42.gfe5df ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs