ceph: fix osd request submission race
authorSage Weil <sage@newdream.net>
Thu, 8 Oct 2009 23:55:47 +0000 (16:55 -0700)
committerSage Weil <sage@newdream.net>
Fri, 9 Oct 2009 18:58:03 +0000 (11:58 -0700)
commitc1ea8823be69ebebaface912142190e910711984
treed834392aebd65a1d538e23b54b63172ca427f29c
parent0656d11ba6ffa3dee0e8916a1903f96185651217
ceph: fix osd request submission race

The osd request submission path registers the request, drops and retakes
the request_mutex, then sends it to the OSD.  A racing kick_requests could
sent it during that interval, causing the same msg to be sent twice and
BUGing in the msgr.

Fix by only sending the message if it hasn't been touched by other
threads.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/osd_client.c