Avoid panic on shutdown with memcache and INVARIANTS
authorBen Kaduk <kaduk@mit.edu>
Tue, 16 Mar 2010 21:07:04 +0000 (17:07 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 17 Mar 2010 00:56:44 +0000 (17:56 -0700)
commite42e0912d774cbfc309250052631c6e60c83164d
tree0da03ed4aa3c023de2da673b6ef873ae31b2c60e
parentc9a4e11bbac143f7e44af4eb1e6fae1653679e33
Avoid panic on shutdown with memcache and INVARIANTS

When running with memcache, the filesystem cache is not initialized,
so the file-local struct vnode *volumeVnode is never set to non-NULL.
However, shutdown_cache() unconditionally calls vrele(volumeVnode),
which triggers a KASSERT that the argument to vrele() is non-NULL.
For certain kernel configurations, this results in a panic.
Change this so that vrele() is only conditionally called if the
volumeVnode is non-NULL.

Change-Id: I80235f0d45ae11f26e9a09854bb34439f89bbb40
Reviewed-on: http://gerrit.openafs.org/1576
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_init.c