Received: by mail.netbsd.org (Postfix, from userid 605) id DCC1784D95; Thu, 23 Apr 2020 22:58:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 61CBB84D8A for ; Thu, 23 Apr 2020 22:58:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Tl8AREKFttiK for ; Thu, 23 Apr 2020 22:58:37 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id F2F2F84C8B for ; Thu, 23 Apr 2020 22:58:36 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id E5655FB27; Thu, 23 Apr 2020 22:58:36 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 23 Apr 2020 22:58:36 +0000 From: "Andrew Doran" Subject: CVS commit: src/sys/kern To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200423225836.E5655FB27@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Andrew Doran" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: ad Date: Thu Apr 23 22:58:36 UTC 2020 Modified Files: src/sys/kern: vfs_cache.c Log Message: cache_lookup_linked(): We can't use the name to decide how to lock the dir, since the name refers to the child (found object) not the parent (the thing that's being locked). Fix it by always doing rw_tryenter(). There's not much to be won by optimising for the contended case, and were this routine doing lockless lookups (the eventual goal) it wouldn't be hanging around waiting for changes either. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sys/kern/vfs_cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.