diff options
author | peter <peter@FreeBSD.org> | 1998-11-10 09:04:09 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-11-10 09:04:09 +0000 |
commit | e2cbb31311dcb5aad532570f7dffd777a8408ff1 (patch) | |
tree | 6100304ba9db8f31f528cba0b8c097a47549fe8f /sys/kern/vfs_default.c | |
parent | b8784ef1750330bf06be7cd66106d137faba55b7 (diff) | |
download | FreeBSD-src-e2cbb31311dcb5aad532570f7dffd777a8408ff1.zip FreeBSD-src-e2cbb31311dcb5aad532570f7dffd777a8408ff1.tar.gz |
Make the vnode opv vector construction fully dynamic. Previously we
leaked memory on each unload and were limited to items referenced in
the kernel copy of vnode_if.c. Now a kernel module is free to create
it's own VOP_FOO() routines and the rest of the system will happily
deal with it, including passthrough layers like union/umap/etc.
Have VFS_SET() call a common vfs_modevent() handler rather than
inline duplicating the common code all over the place.
Have VNODEOP_SET() have the vnodeops removed at unload time (assuming a
module) so that the vop_t ** vector is reclaimed.
Slightly adjust the vop_t ** vectors so that calling slot 0 is a panic
rather than a page fault. This could happen if VOP_something() was called
without *any* handlers being present anywhere (including in vfs_default.c).
slot 1 becomes the default vector for the vnodeop table.
TODO: reclaim zones on unload (eg: nfs code)
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 538cbc0..47545c3 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -130,6 +130,13 @@ vop_defaultop(struct vop_generic_args *ap) return (VOCALL(default_vnodeop_p, ap->a_desc->vdesc_offset, ap)); } +int +vop_panic(struct vop_generic_args *ap) +{ + + panic("illegal vnode op called"); +} + static int vop_nostrategy (struct vop_strategy_args *ap) { |