Module Name:    src
Committed By:   hannken
Date:           Thu Feb 21 08:52:53 UTC 2019

Modified Files:
        src/sys/kern: vfs_trans.c

Log Message:
Fix bad assertion: vfs_suspend(dead_rootmount) may happen and
must return EOPNOTSUPP.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/vfs_trans.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_trans.c
diff -u src/sys/kern/vfs_trans.c:1.54 src/sys/kern/vfs_trans.c:1.55
--- src/sys/kern/vfs_trans.c:1.54	Wed Feb 20 10:09:45 2019
+++ src/sys/kern/vfs_trans.c	Thu Feb 21 08:52:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_trans.c,v 1.54 2019/02/20 10:09:45 hannken Exp $	*/
+/*	$NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.54 2019/02/20 10:09:45 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $");
 
 /*
  * File system transaction operations.
@@ -677,7 +677,8 @@ vfs_suspend(struct mount *mp, int nowait
 	struct fstrans_lwp_info *fli;
 	int error;
 
-	KASSERT(mp != dead_rootmount);
+	if (mp == dead_rootmount)
+		return EOPNOTSUPP;
 
 	fli = fstrans_get_lwp_info(mp, true);
 	mp = fli->fli_mount;

Reply via email to