Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2013 00:20:00 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r246339 - user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys
Message-ID:  <201302050020.r150K01K047428@svn.freebsd.org>

index | next in thread | raw e-mail

Author: attilio
Date: Tue Feb  5 00:20:00 2013
New Revision: 246339
URL: http://svnweb.freebsd.org/changeset/base/246339

Log:
  Restrengten vn_has_cached_data() by also checking the resident pages
  count, just like HEAD does.

Modified:
  user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/vnode.h

Modified: user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/vnode.h
==============================================================================
--- user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/vnode.h	Tue Feb  5 00:09:33 2013	(r246338)
+++ user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/vnode.h	Tue Feb  5 00:20:00 2013	(r246339)
@@ -75,7 +75,8 @@ vn_is_readonly(vnode_t *vp)
 #define	vn_mountedvfs(vp)	((vp)->v_mountedhere)
 #define	vn_has_cached_data(vp)	\
 	((vp)->v_object != NULL && \
-	 !vm_object_cache_is_empty((vp)->v_object))
+	 ((vp)->v_object->resident_page_count > 0 || \
+	  !vm_object_cache_is_empty((vp)->v_object))
 #define	vn_exists(vp)		do { } while (0)
 #define	vn_invalid(vp)		do { } while (0)
 #define	vn_renamepath(tdvp, svp, tnm, lentnm)	do { } while (0)


help

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