diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 1 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 13 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep_stub.c | 7 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 19 |
4 files changed, 38 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 8274765..ae59ca3 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -106,6 +106,7 @@ extern vop_t **ffs_fifoop_p; * Soft update function prototypes. */ void softdep_initialize(void); +void softdep_uninitialize(void); int softdep_mount(struct vnode *, struct mount *, struct fs *, struct ucred *); int softdep_flushworklist(struct mount *, int *, struct thread *); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 0fc1848..4921344 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1132,6 +1132,19 @@ softdep_initialize() } /* + * Executed after all filesystems have been unmounted during + * filesystem module unload. + */ +void +softdep_uninitialize() +{ + + hashdestroy(pagedep_hashtbl, M_PAGEDEP, pagedep_hash); + hashdestroy(inodedep_hashtbl, M_INODEDEP, inodedep_hash); + hashdestroy(newblk_hashtbl, M_NEWBLK, newblk_hash); +} + +/* * Called at mount time to notify the dependency code that a * filesystem wishes to use it. */ diff --git a/sys/ufs/ffs/ffs_softdep_stub.c b/sys/ufs/ffs/ffs_softdep_stub.c index 47feaec..df084c7 100644 --- a/sys/ufs/ffs/ffs_softdep_stub.c +++ b/sys/ufs/ffs/ffs_softdep_stub.c @@ -83,6 +83,13 @@ softdep_initialize() } void +softdep_uninitialize() +{ + + return; +} + +void softdep_setup_inomapdep(bp, ip, newinum) struct buf *bp; struct inode *ip; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 61cec1f..fa0bffa 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -73,6 +73,7 @@ static void ffs_oldfscompat_read(struct fs *, struct ufsmount *, ufs2_daddr_t); static void ffs_oldfscompat_write(struct fs *, struct ufsmount *); static int ffs_init(struct vfsconf *); +static int ffs_uninit(struct vfsconf *); static struct vfsops ufs_vfsops = { ffs_mount, @@ -87,7 +88,7 @@ static struct vfsops ufs_vfsops = { vfs_stdcheckexp, ffs_vptofh, ffs_init, - vfs_stduninit, + ffs_uninit, #ifdef UFS_EXTATTR ufs_extattrctl, #else @@ -1375,7 +1376,7 @@ ffs_vptofh(vp, fhp) } /* - * Initialize the filesystem; just use ufs_init. + * Initialize the filesystem. */ static int ffs_init(vfsp) @@ -1387,6 +1388,20 @@ ffs_init(vfsp) } /* + * Undo the work of ffs_init(). + */ +static int +ffs_uninit(vfsp) + struct vfsconf *vfsp; +{ + int ret; + + ret = ufs_uninit(vfsp); + softdep_uninitialize(); + return (ret); +} + +/* * Write a superblock and associated information back to disk. */ static int |