FBSD: catch up with the disappearance of VOP_GETVOBJECT
authorGarrett Wollman <wollman@csail.mit.edu>
Wed, 10 Aug 2011 04:18:28 +0000 (00:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 10 Aug 2011 17:48:39 +0000 (10:48 -0700)
commit7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3
treef67d2cdbf47d687757f011fe4502f0d65cfb08fa
parent342be3535499c5ecd7d34b4edd43a4655559cb28
FBSD: catch up with the disappearance of VOP_GETVOBJECT

The vnode operation VOP_GETVOBJECT disappeared in FreeBSD 6.0, an
embarrassingly long time ago.  Six years ago, a kluge was added
to emulate its behavior, but it did not correctly emulate the
return value of the old VOP implementation.  As a result,
osi_VM_StoreAllSegments() could never actually do anything.  Since we
don't support FreeBSD before 8.0, remove all references to VOP_GETVOBJECT
and examine vp->v_object directly instead.

This has the result that osi_VM_StoreAllSegments() will actually do
something now, which may not be desirable.  (Previously, if somehow
the vnode had no associated VM object, it would crash, and otherwise
it would do nothing at all.)

Change-Id: Ifdad92ae8e393e85c3f97907af7119ce342b25dd
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/FBSD/osi_vm.c