svn commit: r190143 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Fri Mar 20 04:00:40 PDT 2009
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++;
More information about the svn-src-head
mailing list