From: David Miller <davem@davemloft.net>
To: ap420073@gmail.com
Cc: tgraf@suug.ch, herbert@gondor.apana.org.au,
netdev@vger.kernel.org, fw@strlen.de, pablo@netfilter.org
Subject: Re: [PATCH v2] rhashtable: add restart routine in rhashtable_free_and_destroy()
Date: Sun, 08 Jul 2018 13:09:08 +0900 (KST) [thread overview]
Message-ID: <20180708.130908.2302810149066931900.davem@davemloft.net> (raw)
In-Reply-To: <20180708025551.25879-1-ap420073@gmail.com>
From: Taehee Yoo <ap420073@gmail.com>
Date: Sun, 8 Jul 2018 11:55:51 +0900
> @@ -1143,13 +1143,14 @@ void rhashtable_free_and_destroy(struct rhashtable *ht,
> void (*free_fn)(void *ptr, void *arg),
> void *arg)
> {
> - struct bucket_table *tbl;
> + struct bucket_table *tbl, *next_tbl;
> unsigned int i;
...
> tbl = rht_dereference(ht->tbl, ht);
> +restart:
> if (free_fn) {
...
> @@ -1166,7 +1167,12 @@ void rhashtable_free_and_destroy(struct rhashtable *ht,
> }
> }
>
> + next_tbl = rht_dereference(tbl->future_tbl, ht);
> bucket_table_free(tbl);
> + if (next_tbl) {
> + tbl = next_tbl;
> + goto restart;
> + }
This looks good to me, Herbert please review.
next prev parent reply other threads:[~2018-07-08 4:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-08 2:55 [PATCH v2] rhashtable: add restart routine in rhashtable_free_and_destroy() Taehee Yoo
2018-07-08 4:09 ` David Miller [this message]
2018-07-08 16:11 ` Herbert Xu
2018-07-09 23:29 ` David Miller
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=20180708.130908.2302810149066931900.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ap420073@gmail.com \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=tgraf@suug.ch \
/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;
as well as URLs for NNTP newsgroup(s).