]> git.michaelhowe.org Git - packages/o/openafs.git/commit
FBSD: correct and simplify vcache eviction routines
authorBen Kaduk <kaduk@mit.edu>
Fri, 29 Oct 2010 07:18:02 +0000 (03:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 3 Nov 2010 10:58:15 +0000 (03:58 -0700)
commit2e595e929fc679bd5eb82084e0a60d23fe9e827f
treec78e3dbe4261c4b64a0e0b3b222577bd34c94238
parent9635188652022e0bc9d8d683f1335c1df1cf8033
FBSD: correct and simplify vcache eviction routines

osi_VM_FlushVCache and osi_TryEvictVCache were both attempting
to be wrappers around vgone(), with some checks before hand.
Implement the latter in terms of the former to prevent
code duplication and propagation of incorrect code.

Additionally, correct the locking around vgone().  The
vnode lock must be held, and we must also increase the vnode's
hold count so that it does not disappear out from under us.
As we need the interlock to check the usecount, keep it
locked until we lock the vnode lock, for extra protection.

As an added bonus, we no longer try to call vgonel(), which
is not an exported symbol and merely happened to work due
to the current kernel linker implementation.

Remove some stale comments.

With this change, a parallel buildworld completes on
my four-core machine.

Reviewed-on: http://gerrit.openafs.org/3196
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit aad83a30a82407bfa6ac15b49fd31d69b563e898)
Change-Id: Ibf7f1744f0030c92b45b1558d7f5e52409208e60
Reviewed-on: http://gerrit.openafs.org/3233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/FBSD/osi_vcache.c
src/afs/FBSD/osi_vm.c