svn commit: r197512 -
head/sys/cddl/contrib/opensolaris/uts/common/fs
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Sep 26 00:04:30 UTC 2009
Author: pjd
Date: Sat Sep 26 00:04:30 2009
New Revision: 197512
URL: http://svn.freebsd.org/changeset/base/197512
Log:
- Don't depend on value returned by gfs_*_inactive(), it doesn't work
well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.
PR: kern/139062
Reported by: trasz
MFC after: 3 days
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Fri Sep 25 23:28:57 2009 (r197511)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Sat Sep 26 00:04:30 2009 (r197512)
@@ -595,7 +595,6 @@ found:
if (vp->v_flag & V_XATTRDIR)
VI_LOCK(fp->gfs_parent);
VI_LOCK(vp);
- ASSERT(vp->v_count < 2);
/*
* Really remove this vnode
*/
@@ -607,12 +606,7 @@ found:
*/
ge->gfse_vnode = NULL;
}
- if (vp->v_count == 1) {
- vp->v_usecount--;
- vdropl(vp);
- } else {
- VI_UNLOCK(vp);
- }
+ VI_UNLOCK(vp);
/*
* Free vnode and release parent
@@ -1084,18 +1078,16 @@ gfs_vop_inactive(ap)
{
vnode_t *vp = ap->a_vp;
gfs_file_t *fp = vp->v_data;
- void *data;
if (fp->gfs_type == GFS_DIR)
- data = gfs_dir_inactive(vp);
+ gfs_dir_inactive(vp);
else
- data = gfs_file_inactive(vp);
-
- if (data != NULL)
- kmem_free(data, fp->gfs_size);
+ gfs_file_inactive(vp);
VI_LOCK(vp);
vp->v_data = NULL;
VI_UNLOCK(vp);
+ kmem_free(fp, fp->gfs_size);
+
return (0);
}
More information about the svn-src-head
mailing list