From abd43b3991c3becf4fd3cc1a370aeafdc8749a30 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Mon, 6 May 2013 22:49:44 +0000 Subject: OS-1983 tmpfs force unmount causes illegal VFS_RELEs Reviewed by: Jerry Jelinek --- usr/src/uts/common/fs/tmpfs/tmp_vfsops.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'usr/src/uts/common/fs/tmpfs/tmp_vfsops.c') 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 @@ -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 */ -- cgit v1.2.3