Deal with revoke()'d descriptors. The underlying vnode is vgone()'d, which
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 6 Jun 2004 18:47:51 +0000 (18:47 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 6 Jun 2004 18:47:51 +0000 (18:47 +0000)
commit72402f22d9ebbf44b4fef76eaf59d67f442d8858
tree7e74afb8cb05cea66d35368dd16046b7b9ddee77
parente9c9368488f6ab97f2b375e8ae87e5b0ff32720f
Deal with revoke()'d descriptors.  The underlying vnode is vgone()'d, which
means that it is forceably closed.  This clears v_rdev even though file
descriptors may still have references to the vnode, which leads to panics
(mainly on tty devices).

Check for v_rdev == NULL in most specfs fileops calls and return an error
code instead of panicing.   This isn't the cleanest solution but it's fine
for now.

Reported-by: Sascha Wildner <saw@online.de>
sys/vfs/specfs/spec_vnops.c