--- src/sys/kern/vfs_syscalls.c 2005/02/02 21:34:18 1.58 +++ src/sys/kern/vfs_syscalls.c 2005/03/22 22:13:28 1.59 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -561,6 +562,13 @@ dounmount(struct mount *mp, int flags, s wakeup(mp); return (error); } + /* + * Clean up any journals still associated with the mount after + * filesystem activity has ceased. + */ + journal_remove_all_journals(mp, + ((flags & MNT_FORCE) ? MC_JOURNAL_STOP_IMM : 0)); + TAILQ_REMOVE(&mountlist, mp, mnt_list); /*