All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH, v2] rbd: drop original request earlier for existence check
Date: Thu, 16 May 2013 18:42:50 -0700	[thread overview]
Message-ID: <51958B1A.2090407@inktank.com> (raw)
In-Reply-To: <51954FB1.9060902@inktank.com>

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 05/16/2013 02:29 PM, Alex Elder wrote:
> The reference to the original request dropped at the end of
> rbd_img_obj_exists_callback() corresponds to the reference taken
> in rbd_img_obj_exists_submit() to account for the stat request
> referring to it.  Move the put of that reference up right after
> clearing that pointer to make its purpose more obvious.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
> v2: rebased to reflect changes in earlier patches
>
>   drivers/block/rbd.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index fdbcf04..b4c5e47 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -2529,6 +2529,7 @@ static void rbd_img_obj_exists_callback(struct
> rbd_obj_request *obj_request)
>   	 */
>   	orig_request = obj_request->obj_request;
>   	obj_request->obj_request = NULL;
> +	rbd_obj_request_put(orig_request);
>   	rbd_assert(orig_request);
>   	rbd_assert(orig_request->img_request);
>
> @@ -2549,7 +2550,6 @@ static void rbd_img_obj_exists_callback(struct
> rbd_obj_request *obj_request)
>   	if (!rbd_dev->parent_overlap) {
>   		struct ceph_osd_client *osdc;
>
> -		rbd_obj_request_put(orig_request);
>   		osdc = &rbd_dev->rbd_client->client->osdc;
>   		result = rbd_obj_request_submit(osdc, orig_request);
>   		if (!result)
> @@ -2579,7 +2579,6 @@ static void rbd_img_obj_exists_callback(struct
> rbd_obj_request *obj_request)
>   out:
>   	if (orig_request->result)
>   		rbd_obj_request_complete(orig_request);
> -	rbd_obj_request_put(orig_request);
>   }
>
>   static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request)
>


      reply	other threads:[~2013-05-17  1:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14  1:39 [PATCH] rbd: drop original request earlier for existence check Alex Elder
2013-05-14  1:41 ` Alex Elder
2013-05-16 21:29 ` [PATCH, v2] " Alex Elder
2013-05-17  1:42   ` Josh Durgin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51958B1A.2090407@inktank.com \
    --to=josh.durgin@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.