]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:08 +0000 (11:38 -0800)
commit15ba38ebcee664a5a5de57300ee721e0d65b2dd5
treef88717a58c67b838ca063aa097e807a30e3be131
parent1d3df0e26616d97a798950eb5fb908b14b1839da
libceph: avoid unregistering osd request when not registered

(cherry picked from commit 35f9f8a09e1e88e31bd34a1e645ca0e5f070dd5c)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/osd_client.c