]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: always remove cond from list after waiting 179/head
authorSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 16:12:44 +0000 (09:12 -0700)
committerSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 16:12:44 +0000 (09:12 -0700)
commit782681402ffbfdb744405717782dc1d01fef3968
tree5deb8424b85783109b3b2ebea58a0c76d2fcd50c
parentce8793ce3bd8b816aa6083175d6dd1c614a71aae
client: always remove cond from list after waiting

The signal method removes conds from the list after it signals.  That's
not okay if the cond triggers for some other reason; an invalid Cond*
will remain on the list and get signaled later.

Make the wait_on_list() helper remove it; use that in several callers;
explicitly do the removal in the remaining callers.

Change signal_cond_list() to not clear the list; rely on the signalee's to
do that.  Audit all users and make sure they are either using the
wait_on_list() helper (which removes its Cond) or do the remove explicitly.

Backport some form of this: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc