]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Eliminate code duplication in vn_fullpath1() around the cache lookups
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 31 May 2009 14:57:43 +0000 (14:57 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 31 May 2009 14:57:43 +0000 (14:57 +0000)
commit0449e6e1ebf8855beefb9378cb9e097f3e091f36
treee967370fdcc8de8ab496321c7238fa38b602185d
parentb9131889d2a773710dcad798ec26551c12c11855
Eliminate code duplication in vn_fullpath1() around the cache lookups
and calls to vn_vptocnp() by moving more of the common code to
vn_vptocnp(). Rename vn_vptocnp() to vn_vptocnp_locked() to signify that
cache is locked around the call.

Do not track buffer position by both the pointer and offset, use only
buflen to record the start of the free space.

Export vn_vptocnp() for external consumers as a wrapper around
vn_vptocnp_locked() that locks the cache and handles hold counts.

Tested by: pho
sys/kern/vfs_cache.c
sys/sys/vnode.h