Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 19:26:36 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193110 - head/sys/cddl/contrib/opensolaris/uts/common/fs
Message-ID:  <200905301926.n4UJQati016840@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sat May 30 19:26:35 2009
New Revision: 193110
URL: http://svn.freebsd.org/changeset/base/193110

Log:
  work around snapshot shutdown race reported by Henri Hennebert

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	Sat May 30 19:23:09 2009	(r193109)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c	Sat May 30 19:26:35 2009	(r193110)
@@ -564,8 +564,13 @@ gfs_file_inactive(vnode_t *vp)
 	if (fp->gfs_parent == NULL || (vp->v_flag & V_XATTRDIR))
 		goto found;
 
-	dp = fp->gfs_parent->v_data;
-
+	/*
+	 * XXX cope with a FreeBSD-specific race wherein the parent's
+	 * snapshot data can be freed before the parent is
+	 */
+	if ((dp = fp->gfs_parent->v_data) == NULL)
+		return (NULL);
+		
 	/*
 	 * First, see if this vnode is cached in the parent.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905301926.n4UJQati016840>