]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: avoid unregistering osd request when not registered
authorSage Weil <sage@inktank.com>
Wed, 16 May 2012 20:16:38 +0000 (15:16 -0500)
committerSage Weil <sage@inktank.com>
Sat, 19 May 2012 00:36:00 +0000 (17:36 -0700)
commit3bb3fc3695ef285e963dbd5c84e205cab844725b
treec7bc4a1dba445ea2e250decbf9b88282ee37cb3f
parent6146d0039de2960f826c26f864821fef11bbdc9a
libceph: avoid unregistering osd request when not registered

There is a race between two __unregister_request() callers: the
reply path and the ceph_osdc_wait_request().  If we get a reply
*and* the timeout expires at roughly the same time, both callers
will try to unregister the request, and the second one will do bad
things.

Simply check if the request is still already unregistered; if so,
return immediately and do nothing.

Fixes http://tracker.newdream.net/issues/2420

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
net/ceph/osd_client.c