From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [ltt-dev] [PATCH 1/6] rculfhash: Fix ht allocation bug
Date: Tue, 1 Nov 2011 12:49:39 -0400 [thread overview]
Message-ID: <20111101164939.GA18068@Krystal> (raw)
In-Reply-To: <e790679beb8d966aa5dfc8205aaf844aee1546de.1320051657.git.laijs@cn.fujitsu.com>
* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> Fix a bug introduced by Lai Jiangshan <laijs at cn.fujitsu.com>:
> alloc_split_items_count() use a wrong flags.
>
> ht->flags should be inited earlier.
Merged, thanks!
Mathieu
>
> Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
> ---
> rculfhash.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/rculfhash.c b/rculfhash.c
> index d786a3d..da37e97 100644
> --- a/rculfhash.c
> +++ b/rculfhash.c
> @@ -1330,6 +1330,7 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct,
> init_size = max(init_size, min_alloc_size);
> ht = calloc(1, sizeof(struct cds_lfht));
> assert(ht);
> + ht->flags = flags;
> ht->hash_fct = hash_fct;
> ht->compare_fct = compare_fct;
> ht->hash_seed = hash_seed;
> @@ -1345,7 +1346,6 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct,
> alloc_split_items_count(ht);
> /* this mutex should not nest in read-side C.S. */
> pthread_mutex_init(&ht->resize_mutex, NULL);
> - ht->flags = flags;
> order = get_count_order_ulong(init_size);
> ht->t.resize_target = 1UL << order;
> cds_lfht_create_dummy(ht, 1UL << order);
> --
> 1.7.4.4
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next parent reply other threads:[~2011-11-01 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1320051657.git.laijs@cn.fujitsu.com>
[not found] ` <e790679beb8d966aa5dfc8205aaf844aee1546de.1320051657.git.laijs@cn.fujitsu.com>
2011-11-01 16:49 ` Mathieu Desnoyers [this message]
[not found] ` <1e66797f29e51b31e9f3b56dad65ac03651df526.1320051657.git.laijs@cn.fujitsu.com>
2011-11-01 17:00 ` [ltt-dev] [PATCH 2/6] rculfhash: Fix ht lazy grow logic Mathieu Desnoyers
2011-11-02 1:42 ` Lai Jiangshan
2011-11-02 15:13 ` Mathieu Desnoyers
2011-11-02 15:15 ` Mathieu Desnoyers
[not found] ` <a7d9cb37f37875bec47413d43274037be105bcf6.1320051657.git.laijs@cn.fujitsu.com>
2011-11-01 17:04 ` [ltt-dev] [PATCH 6/6] rculfhash: add min_alloc_size test parameter Mathieu Desnoyers
[not found] ` <bbea95bb9f3203390b69539a5801e1aff0eba3bc.1320051657.git.laijs@cn.fujitsu.com>
2011-11-01 17:06 ` [ltt-dev] [PATCH 3/6] rculfhash: merge duplicated code of cds_lfht_resize_lazy_*() Mathieu Desnoyers
2011-11-02 15:17 ` Mathieu Desnoyers
[not found] ` <23191cb487d53146a79f0fae67cfaa6287d5ab1c.1320051657.git.laijs@cn.fujitsu.com>
2011-11-01 17:08 ` [ltt-dev] [PATCH 4/6] rculfhash: Change lazy shrink strategy Mathieu Desnoyers
2011-11-02 8:18 ` Lai Jiangshan
2011-11-02 15:27 ` Mathieu Desnoyers
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=20111101164939.GA18068@Krystal \
--to=mathieu.desnoyers@efficios.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox