Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Merge vfs_shutdown1() and vfs_shutdown().
details: https://anonhg.NetBSD.org/src/rev/f4212f77be41
branches: trunk
changeset: 763737:f4212f77be41
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Apr 02 06:48:20 2011 +0000
description:
Merge vfs_shutdown1() and vfs_shutdown().
diffstat:
sys/kern/vfs_mount.c | 40 +++++++++++++++-------------------------
1 files changed, 15 insertions(+), 25 deletions(-)
diffs (68 lines):
diff -r debd65881251 -r f4212f77be41 sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c Sat Apr 02 05:07:56 2011 +0000
+++ b/sys/kern/vfs_mount.c Sat Apr 02 06:48:20 2011 +0000
@@ -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,36 +1002,26 @@
printf("done\n");
}
-static void
-vfs_shutdown1(struct lwp *l)
-{
-
- vfs_sync_all(l);
-
- /*
- * If we've panic'd, don't make the situation potentially
- * worse by unmounting the file systems.
- */
- 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)
{
+ lwp_t *l = curlwp;
- /* XXX we're certainly not running in lwp0's context! */
- vfs_shutdown1(curlwp);
+ vfs_sync_all(l);
+
+ /*
+ * If we have paniced - do not make the situation potentially
+ * worse by unmounting the file systems.
+ */
+ if (panicstr != NULL) {
+ return;
+ }
+
+ /* Unmount file systems. */
+ vfs_unmountall(l);
}
/*
Home |
Main Index |
Thread Index |
Old Index