From: Linus Torvalds Date: Fri, 22 Feb 2008 20:42:09 GMT Subject: Re: [PATCH] hash: fix lookup_hash semantics Message-ID: In-Reply-To: <20080222194726.GA24532@sigill.intra.peff.net> On Fri, 22 Feb 2008, Jeff King wrote: > > We were returning the _address of_ the stored item (or NULL) > instead of the item itself. While this sort of indirection > is useful for insertion (since you can lookup and then > modify), it is unnecessary for read-only lookup. Gaah. That code returned the pointer-to-a-pointer exactly because of the insert case, but then to clean it up I had split it up into that internal "lookup_hash_entry()" case, but left the broken semantics for lookup_hash(). Stupid. Your patch is obviously correct, and should probably go into maint just so that no other code makes the mistake of using that broken interface. Linus