From owner-svn-src-head@freebsd.org Wed Nov 1 08:40:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56FCFE4D1D2; Wed, 1 Nov 2017 08:40:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23843375A; Wed, 1 Nov 2017 08:40:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA18e4a5001480; Wed, 1 Nov 2017 08:40:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA18e4Ab001479; Wed, 1 Nov 2017 08:40:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711010840.vA18e4Ab001479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 1 Nov 2017 08:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325268 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 08:40:05 -0000 Author: mjg Date: Wed Nov 1 08:40:04 2017 New Revision: 325268 URL: https://svnweb.freebsd.org/changeset/base/325268 Log: namecache: fix .. check broken after r324378 wtf by: mjg Diagnosed by: avg Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Nov 1 06:46:58 2017 (r325267) +++ head/sys/kern/vfs_cache.c Wed Nov 1 08:40:04 2017 (r325268) @@ -1126,7 +1126,8 @@ cache_lookup_nomakeentry(struct vnode *dvp, struct vno uint32_t hash; int error; - if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { + if (cnp->cn_namelen == 2 && + cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { counter_u64_add(dotdothits, 1); dvlp = VP2VNODELOCK(dvp); dvlp2 = NULL; @@ -1219,7 +1220,8 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st retry: blp = NULL; error = 0; - if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { + if (cnp->cn_namelen == 2 && + cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { counter_u64_add(dotdothits, 1); dvlp = VP2VNODELOCK(dvp); dvlp2 = NULL;