From: Alex Elder Date: Thu, 6 Dec 2012 13:22:04 +0000 (-0600) Subject: libceph: register request before unregister linger X-Git-Tag: v3.4.26~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d3b9fff8bc11bc7d745c6b34c098b1c548fec65;p=karo-tx-linux.git libceph: register request before unregister linger In kick_requests(), we need to register the request before we unregister the linger request. Otherwise the unregister will reset the request's osd pointer to NULL. Signed-off-by: Alex Elder Reviewed-by: Sage Weil (cherry picked from commit c89ce05e0c5a01a256100ac6a6019f276bdd1ca6) Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 2c3951628872..93845f23d3f7 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1364,8 +1364,8 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend) dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid, req->r_osd ? req->r_osd->o_osd : -1); - __unregister_linger_request(osdc, req); __register_request(osdc, req); + __unregister_linger_request(osdc, req); } mutex_unlock(&osdc->request_mutex);