kern/132068: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Sat Sep 12 19:30:08 UTC 2009
The following reply was made to PR kern/132068; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/132068: commit references a PR
Date: Sat, 12 Sep 2009 19:28:07 +0000 (UTC)
Author: pjd
Date: Sat Sep 12 19:27:54 2009
New Revision: 197131
URL: http://svn.freebsd.org/changeset/base/197131
Log:
Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
NULL, but also can point to dead vnode, take that into account.
PR: kern/132068
Reported by: Edward Fisk" <7ogcg7g02 at sneakemail.com>, kris
Fix based on patch from: Jaakko Heinonen <jh at saunalahti.fi>
MFC after: 1 week
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Sep 12 19:07:03 2009 (r197130)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Sep 12 19:27:54 2009 (r197131)
@@ -890,8 +890,16 @@ again:
if (zp->z_unlinked) {
err = ENOENT;
} else {
- if (ZTOV(zp) != NULL)
- VN_HOLD(ZTOV(zp));
+ if ((vp = ZTOV(zp)) != NULL) {
+ VI_LOCK(vp);
+ if ((vp->v_iflag & VI_DOOMED) != 0) {
+ VI_UNLOCK(vp);
+ vp = NULL;
+ } else
+ VI_UNLOCK(vp);
+ }
+ if (vp != NULL)
+ VN_HOLD(vp);
else {
if (first) {
ZFS_LOG(1, "dying znode detected (zp=%p)", zp);
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-fs
mailing list