Correctly close old nfsd/lockd sockets.
commit7a1fa065a0in mainline. Commitaaf68cfbf2added 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7cd5471bea
commit
7eafb2d538
@@ -1573,7 +1573,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);
|
||||
|
||||
Reference in New Issue
Block a user