mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Thomas Graf <tgraf@suug.ch>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH] rhashtable: remove duplicate comment.
Date: Thu, 11 Sep 2014 17:10:19 +1000	[thread overview]
Message-ID: <20140911171019.223c287f@notabene.brown> (raw)

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]



The second comment is identical to the earlier comment, just indented
a bit. This is confusing, so remove it.

Also expand that first comment to mention the splicing that happens.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index a2c78810ebc1..8fd2f21d022a 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -309,15 +309,12 @@ int rhashtable_shrink(struct rhashtable *ht, gfp_t flags)
 
 	/* Link each bucket in the new table to the first bucket
 	 * in the old table that contains entries which will hash
-	 * to the new bucket.
+	 * to the new bucket, and then splice in the second
+	 * bucket from the old table.
 	 */
 	for (i = 0; i < ntbl->size; i++) {
 		ntbl->buckets[i] = tbl->buckets[i];
 
-		/* Link each bucket in the new table to the first bucket
-		 * in the old table that contains entries which will hash
-		 * to the new bucket.
-		 */
 		for (pprev = &ntbl->buckets[i]; *pprev != NULL;
 		     pprev = &rht_dereference(*pprev, ht)->next)
 			;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

             reply	other threads:[~2014-09-11  7:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  7:10 NeilBrown [this message]
2014-09-11  7:48 ` Thomas Graf

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=20140911171019.223c287f@notabene.brown \
    --to=neilb@suse.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --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

all inboxes | Powered by JetHome®