Module Name: src Committed By: rmind Date: Sat Apr 2 06:48:22 UTC 2011
Modified Files: src/sys/kern: vfs_mount.c Log Message: Merge vfs_shutdown1() and vfs_shutdown(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/kern/vfs_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/vfs_mount.c diff -u src/sys/kern/vfs_mount.c:1.2 src/sys/kern/vfs_mount.c:1.3 --- src/sys/kern/vfs_mount.c:1.2 Sat Apr 2 04:45:24 2011 +++ src/sys/kern/vfs_mount.c Sat Apr 2 06:48:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_mount.c,v 1.2 2011/04/02 04:45:24 rmind Exp $ */ +/* $NetBSD: vfs_mount.c,v 1.3 2011/04/02 06:48:20 rmind Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.2 2011/04/02 04:45:24 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.3 2011/04/02 06:48:20 rmind Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1002,39 +1002,29 @@ printf("done\n"); } -static void -vfs_shutdown1(struct lwp *l) +/* + * Sync and unmount file systems before shutting down. + */ +void +vfs_shutdown(void) { + lwp_t *l = curlwp; vfs_sync_all(l); /* - * If we've panic'd, don't make the situation potentially + * If we have paniced - do not make the situation potentially * worse by unmounting the file systems. */ - if (panicstr != NULL) + if (panicstr != NULL) { return; + } - /* Release inodes held by texts before update. */ -#ifdef notdef - vnshutdown(); -#endif /* Unmount file systems. */ vfs_unmountall(l); } /* - * Sync and unmount file systems before shutting down. - */ -void -vfs_shutdown(void) -{ - - /* XXX we're certainly not running in lwp0's context! */ - vfs_shutdown1(curlwp); -} - -/* * Print a list of supported file system types (used by vfs_mountroot) */ static void