Date: Fri, 20 Mar 2009 11:00:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190143 - head/sys/kern Message-ID: <200903201100.n2KB0dwg000271@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Mar 20 11:00:39 2009 New Revision: 190143 URL: http://svn.freebsd.org/changeset/base/190143 Log: Do not forget to adjust buflen for the first resolution of the path from namecache. While there, compare pointers for equiality. Reviewed by: marcus Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Mar 20 10:59:06 2009 (r190142) +++ head/sys/kern/vfs_cache.c Fri Mar 20 11:00:39 2009 (r190143) @@ -956,7 +956,8 @@ vn_fullpath1(struct thread *td, struct v if (vp->v_type != VDIR) { ncp = TAILQ_FIRST(&vp->v_cache_dst); if (ncp != NULL) { - for (i = ncp->nc_nlen - 1; i >= 0 && bp > buf; i--) + buflen -= ncp->nc_nlen; + for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) *--bp = ncp->nc_name[i]; if (bp == buf) { numfullpathfail4++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201100.n2KB0dwg000271>