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>
pag_epoch = 0;
pagCounter = 0;
#if defined(AFS_XBSD_ENV)
- vrele(volumeVnode); /* let it go, finally. */
- volumeVnode = NULL;
+ /* memcache never sets this, so don't panic on shutdown */
+ if (volumeVnode != NULL) {
+ vrele(volumeVnode); /* let it go, finally. */
+ volumeVnode = NULL;
+ }
if (cacheDev.held_vnode) {
vrele(cacheDev.held_vnode);
cacheDev.held_vnode = NULL;