Skip to content

Commit

Permalink
libceph: osd_client: don't drop reply reference too early
Browse files Browse the repository at this point in the history
In ceph_osdc_release_request(), a reference to the r_reply message
is dropped.  But just after that, that same message is revoked if it
was in use to receive an incoming reply.  Reorder these so we are
sure we hold a reference until we're actually done with the message.

Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
(cherry picked from commit ab8cb34)
  • Loading branch information
Alex Elder committed Jun 20, 2012
1 parent 61600ef commit 680584f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ void ceph_osdc_release_request(struct kref *kref)

if (req->r_request)
ceph_msg_put(req->r_request);
if (req->r_reply)
ceph_msg_put(req->r_reply);
if (req->r_con_filling_msg) {
dout("release_request revoking pages %p from con %p\n",
req->r_pages, req->r_con_filling_msg);
ceph_con_revoke_message(req->r_con_filling_msg,
req->r_reply);
ceph_con_put(req->r_con_filling_msg);
}
if (req->r_reply)
ceph_msg_put(req->r_reply);
if (req->r_own_pages)
ceph_release_page_vector(req->r_pages,
req->r_num_pages);
Expand Down

0 comments on commit 680584f

Please sign in to comment.