Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Suspend the mounted file system while updating.
details: https://anonhg.NetBSD.org/src/rev/effb5f590155
branches: trunk
changeset: 351850:effb5f590155
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Mar 01 10:45:24 2017 +0000
description:
Suspend the mounted file system while updating.
diffstat:
sys/kern/vfs_syscalls.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 609b75fdbc9b -r effb5f590155 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Wed Mar 01 10:44:47 2017 +0000
+++ b/sys/kern/vfs_syscalls.c Wed Mar 01 10:45:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.507 2017/03/01 10:44:47 hannken Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.508 2017/03/01 10:45:24 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.507 2017/03/01 10:44:47 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.508 2017/03/01 10:45:24 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -287,6 +287,10 @@
goto out;
}
+ error = vfs_suspend(mp, 0);
+ if (error)
+ goto out;
+
mutex_enter(&mp->mnt_updating);
mp->mnt_flag &= ~MNT_OP_FLAGS;
@@ -339,6 +343,7 @@
vfs_syncer_remove_from_worklist(mp);
}
mutex_exit(&mp->mnt_updating);
+ vfs_resume(mp);
vfs_unbusy(mp, false, NULL);
if ((error == 0) && !(saved_flags & MNT_EXTATTR) &&
Home |
Main Index |
Thread Index |
Old Index