From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH] rbd: simplify __rbd_init_snaps_header()
Date: Tue, 07 Aug 2012 18:29:59 -0700 [thread overview]
Message-ID: <5021C117.5000503@inktank.com> (raw)
In-Reply-To: <5021C06F.2050600@inktank.com>
On 08/07/2012 06:27 PM, Alex Elder wrote:
> On 08/07/2012 06:03 PM, Alex Elder wrote:
>>>> + __rbd_remove_snap_dev(snap);
>>>> +
>>>> + /* Done with this list entry; advance */
>>>> +
>>>> + links = next;
>>>
>>> This could just be links = links->next like you have later.
>>
>> I just used "next" because I had it available here but not
>> below. I do like consistency though so I'll make your
>> suggested change.
>
> After looking at it again, I don't think you're right.
>
> The reason is that __rbd_remove_snap_dev() actually unlinks
> the "snap" from the list that contains it, and "links" at
> this point is referring to &snap->node, which is modified
> by the list deletion.
>
> The assignment I had originally, which uses a saved copy
> of links->next, is the correct one. So I'll be committing
> with my original version of this section of code.
>
> -Alex
Ah, good point. That's fine then.
Josh
prev parent reply other threads:[~2012-08-08 1:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 17:45 [PATCH] rbd: simplify __rbd_init_snaps_header() Alex Elder
2012-08-07 23:27 ` Josh Durgin
2012-08-08 1:03 ` Alex Elder
2012-08-08 1:27 ` Alex Elder
2012-08-08 1:29 ` 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=5021C117.5000503@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.