Skip to content

Commit

Permalink
libceph: register request before unregister linger
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
Alex Elder committed Dec 20, 2012
1 parent a978fa2 commit c89ce05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,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);

Expand Down

0 comments on commit c89ce05

Please sign in to comment.