diff options
author | Neil Brown <neilb@suse.de> | 2007-09-14 10:28:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-14 16:58:11 -0400 |
commit | 7a1fa065a0264f6b3d3003ba5635289f6583c478 (patch) | |
tree | c8193e1c65a7b2ced3366a02668261a553150ff4 /net | |
parent | 2123a09f3f129f4d56f59026ec63e5990f86db2f (diff) |
Correctly close old nfsd/lockd sockets.
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 <wolfgang.walter@studentenwerk.mhn.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svcsock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 12ff5da8160e..1a899924023f 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1592,7 +1592,7 @@ svc_age_temp_sockets(unsigned long closure) | |||
1592 | 1592 | ||
1593 | if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) | 1593 | if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) |
1594 | continue; | 1594 | continue; |
1595 | if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags)) | 1595 | if (atomic_read(&svsk->sk_inuse) > 1 || test_bit(SK_BUSY, &svsk->sk_flags)) |
1596 | continue; | 1596 | continue; |
1597 | atomic_inc(&svsk->sk_inuse); | 1597 | atomic_inc(&svsk->sk_inuse); |
1598 | list_move(le, &to_be_aged); | 1598 | list_move(le, &to_be_aged); |