Message ID | 1409233128-9919-257-git-send-email-sweil@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, Aug 28, 2014 at 06:38:01AM -0700, sweil@redhat.com wrote:
> From: Alex Elder <elder@linaro.org>
<snip>
Any specific reason you send this to everyone and a public mailing list?
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 28 Aug 2014, Greg KH wrote: > On Thu, Aug 28, 2014 at 06:38:01AM -0700, sweil@redhat.com wrote: > > From: Alex Elder <elder@linaro.org> > > <snip> > > Any specific reason you send this to everyone and a public mailing list? Problem between chair and keyboard; forgot --suppress-cc=all to git send-email. Sorry for the spam! sage -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 7857279..5dee05d 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1426,6 +1426,13 @@ static void rbd_obj_request_put(struct rbd_obj_request *obj_request) kref_put(&obj_request->kref, rbd_obj_request_destroy); } +static void rbd_img_request_get(struct rbd_img_request *img_request) +{ + dout("%s: img %p (was %d)\n", __func__, img_request, + atomic_read(&img_request->kref.refcount)); + kref_get(&img_request->kref); +} + static bool img_request_child_test(struct rbd_img_request *img_request); static void rbd_parent_request_destroy(struct kref *kref); static void rbd_img_request_destroy(struct kref *kref); @@ -2186,6 +2193,7 @@ static void rbd_img_obj_callback(struct rbd_obj_request *obj_request) img_request->next_completion = which; out: spin_unlock_irq(&img_request->completion_lock); + rbd_img_request_put(img_request); if (!more) rbd_img_request_complete(img_request); @@ -2285,6 +2293,7 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request, goto out_unwind; obj_request->osd_req = osd_req; obj_request->callback = rbd_img_obj_callback; + rbd_img_request_get(img_request); if (write_request) { osd_req_op_alloc_hint_init(osd_req, which,