summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2013-05-06 22:49:44 +0000
committerRobert Mustacchi <rm@joyent.com>2013-05-06 23:22:33 +0000
commitabd43b3991c3becf4fd3cc1a370aeafdc8749a30 (patch)
treef012e3a3ab9a84297574805b1e43c83eb616aa16
parente9bec191f875d760157dfd5d90d68d37c186a1d3 (diff)
downloadillumos-joyent-eu-ams-1.tar.gz
OS-1983 tmpfs force unmount causes illegal VFS_RELEseu-ams-1
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--usr/src/uts/common/fs/tmpfs/tmp_vfsops.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c b/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
index de201efa25..91d953f88a 100644
--- a/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
+++ b/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
#include <sys/types.h>
@@ -565,6 +565,16 @@ tmp_freevfs(vfs_t *vfsp)
* tmpnode_free which assumes that the directory entry has been
* removed before the file.
*/
+
+ /*
+ * Now that we are tearing ourselves down we need to remove the
+ * UNMOUNTED flag. If we don't, we'll later hit a VN_RELE when we remove
+ * files from the system causing us to have a negative value. Doing this
+ * seems a bit better than trying to set a flag on the tmount that says
+ * we're tearing down.
+ */
+ vfsp->vfs_flag &= ~VFS_UNMOUNTED;
+
/*
* Remove all directory entries
*/