svn commit: r271586 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sun Sep 14 10:27:36 UTC 2014


Author: kib
Date: Sun Sep 14 10:27:36 2014
New Revision: 271586
URL: http://svnweb.freebsd.org/changeset/base/271586

Log:
  Fix mis-spelling of bits and types names in the vnode_pager_putpages().
  The changes should not modify the generated code.
  
  The pager->pgo_putpages() method takes int flags as its fourth
  argument, while vnode_pager_putpages() used boolean_t (which is
  typedef'ed to int).  The flags are from VM_PAGER_* namespace, while
  vnode_pager_putpages() passed TRUE and OBJPC_SYNC to VOP_PUTPAGES(),
  which both are numerically equal to VM_PAGER_PUT_SYNC.
  
  Noted and reviewed by:	alc (previous version)
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Sun Sep 14 10:07:12 2014	(r271585)
+++ head/sys/vm/vnode_pager.c	Sun Sep 14 10:27:36 2014	(r271586)
@@ -83,7 +83,7 @@ static int vnode_pager_input_smlfs(vm_ob
 static int vnode_pager_input_old(vm_object_t object, vm_page_t m);
 static void vnode_pager_dealloc(vm_object_t);
 static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int);
-static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *);
+static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, int, int *);
 static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int *);
 static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t,
     vm_ooffset_t, struct ucred *cred);
@@ -1008,7 +1008,7 @@ vnode_pager_generic_getpages(struct vnod
  */
 static void
 vnode_pager_putpages(vm_object_t object, vm_page_t *m, int count,
-    boolean_t sync, int *rtvals)
+    int flags, int *rtvals)
 {
 	int rtval;
 	struct vnode *vp;
@@ -1026,16 +1026,16 @@ vnode_pager_putpages(vm_object_t object,
 	 * daemon up.  This should be probably be addressed XXX.
 	 */
 
-	if ((vm_cnt.v_free_count + vm_cnt.v_cache_count) <
+	if (vm_cnt.v_free_count + vm_cnt.v_cache_count <
 	    vm_cnt.v_pageout_free_min)
-		sync |= OBJPC_SYNC;
+		flags |= VM_PAGER_PUT_SYNC;
 
 	/*
 	 * Call device-specific putpages function
 	 */
 	vp = object->handle;
 	VM_OBJECT_WUNLOCK(object);
-	rtval = VOP_PUTPAGES(vp, m, bytes, sync, rtvals);
+	rtval = VOP_PUTPAGES(vp, m, bytes, flags, rtvals);
 	KASSERT(rtval != EOPNOTSUPP, 
 	    ("vnode_pager: stale FS putpages\n"));
 	VM_OBJECT_WLOCK(object);


More information about the svn-src-all mailing list