From: Hannes Reinecke <hare@suse.de>
To: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH] dm-mpath: Track invalid map_context
Date: Mon, 19 Mar 2012 16:36:27 +0100 [thread overview]
Message-ID: <4F67527B.9050403@suse.de> (raw)
In-Reply-To: <20120319152007.GD4495@agk-dp.fab.redhat.com>
On 03/19/2012 04:20 PM, Alasdair G Kergon wrote:
> On Mon, Mar 19, 2012 at 04:15:28PM +0100, Hannes Reinecke wrote:
>> - if (r < 0 || r == DM_MAPIO_REQUEUE)
>> + if (r < 0 || r == DM_MAPIO_REQUEUE) {
>> mempool_free(mpio, m->mpio_pool);
>> + map_context->ptr = NULL;
>> + }
>
> What about the other places that do mempool_free() ?
> Should they clear it too?
>
Hmm. Probably. It's not strictly speaking required as the other
places will never re-use the context pointer.
But for consistencies sake you are correct.
Will be updating the patch.
> Is it better to swap the statement order - clear it *before*
> freeing i
>
Doubt that should be required.
I would hope that the map_context pointer is protected by
appropriate locks.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2012-03-19 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 15:15 [PATCH] dm-mpath: Track invalid map_context Hannes Reinecke
2012-03-19 15:20 ` Alasdair G Kergon
2012-03-19 15:36 ` Hannes Reinecke [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-19 15:39 Hannes Reinecke
2012-03-21 4:16 ` Jun'ichi Nomura
2012-03-23 23:33 ` Alasdair G Kergon
2012-03-26 6:18 ` Hannes Reinecke
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=4F67527B.9050403@suse.de \
--to=hare@suse.de \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=snitzer@redhat.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.