]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Solaris: prevent AFS umount while busy
authorAndrew Deason <adeason@sinenomine.net>
Thu, 29 Apr 2010 22:47:15 +0000 (17:47 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 4 May 2010 00:11:44 +0000 (17:11 -0700)
commitfc8ab5cfd6592f9a9df24706a8f5dcc1e41f2b33
treeab0f427567de28cc128d11e38832fbc08c7bfdb8
parent34b7fd4a4989fe5d0484e00ae9582d2f29d98d9c
Solaris: prevent AFS umount while busy

Return EBUSY from unmount if someone still references stuff in AFS.
This prevents kernel panics that can occur on shutdown if we umount
while there is a file in AFS open. Normally a process can hold a file
in AFS open, AFS is unmounted, and the file is closed, triggering our
code which explodes if called after we're unmounted.

This adds VFS_HOLD/VFS_RELE calls whenever we 'create' a vcache, or
retire an old one, to keep track if anyone has an open reference to
us.

Change-Id: I95d8cf7e7e4d32a05bee97e06832a530b40af217
Reviewed-on: http://gerrit.openafs.org/1880
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/SOLARIS/osi_machdep.h
src/afs/SOLARIS/osi_vcache.c
src/afs/SOLARIS/osi_vfsops.c
src/afs/SOLARIS/osi_vnodeops.c