svn commit: r193637 - head/sys/kern

Alan Cox alc at FreeBSD.org
Sun Jun 7 18:19:05 UTC 2009


Author: alc
Date: Sun Jun  7 18:19:04 2009
New Revision: 193637
URL: http://svn.freebsd.org/changeset/base/193637

Log:
  Eliminate an unused variable from allocbuf().
  
  Eliminate the unnecessary setting of page valid bits from a non-VMIO buffer
  in vm_hold_load_pages().

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Sun Jun  7 15:04:43 2009	(r193636)
+++ head/sys/kern/vfs_bio.c	Sun Jun  7 18:19:04 2009	(r193637)
@@ -2946,7 +2946,6 @@ allocbuf(struct buf *bp, int size)
 			 * We are growing the buffer, possibly in a 
 			 * byte-granular fashion.
 			 */
-			struct vnode *vp;
 			vm_object_t obj;
 			vm_offset_t toff;
 			vm_offset_t tinc;
@@ -2958,7 +2957,6 @@ allocbuf(struct buf *bp, int size)
 			 * range covered by the buffer.
 			 */
 
-			vp = bp->b_vp;
 			obj = bp->b_bufobj->bo_object;
 
 			VM_OBJECT_LOCK(obj);
@@ -3762,7 +3760,6 @@ tryagain:
 			VM_WAIT;
 			goto tryagain;
 		}
-		p->valid = VM_PAGE_BITS_ALL;
 		pmap_qenter(pg, &p, 1);
 		bp->b_pages[index] = p;
 	}


More information about the svn-src-all mailing list