Re: [PATCH 1/2] rhashtable: fix insertion of in rhltable when duplicate found.
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2018-03-29 05:40:51
Also in:
lkml
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2018-03-29 05:40:51
Also in:
lkml
On Thu, Mar 29, 2018 at 12:19:09PM +1100, NeilBrown wrote:
When rhltable_insert() finds an entry with the same key, it splices the new entry at the start of a list of entries with the same key. It stores the address of the new object in *pprev, but in general this is *not* the location where the match was found (though in a common case where the hash chain has one element, it will be). To fix this, pprev should be updated every time we find an object that doesn't match. This patch changes the behaviour for non-slow insertion in that now insertion happens at the end of a chain rather than at the head. I don't think this is an important change. Signed-off-by: NeilBrown <redacted>
Thanks. But Paul Blakey beat you to it :) https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=d3dcf8eb615537526bd42ff27a081d46d337816e -- Email: Herbert Xu [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt