PERFORCE change 200764 for review

John Baldwin jhb at FreeBSD.org
Wed Oct 26 15:38:23 UTC 2011


http://p4web.freebsd.org/@@200764?ac=10

Change 200764 by jhb at jhb_jhbbsd on 2011/10/26 15:38:18

	Tweaks.

Affected files ...

.. //depot/projects/fadvise/sys/kern/vfs_subr.c#3 edit
.. //depot/projects/fadvise/sys/kern/vfs_syscalls.c#11 edit

Differences ...

==== //depot/projects/fadvise/sys/kern/vfs_subr.c#3 (text+ko) ====

@@ -1256,7 +1256,7 @@
  *
  */
 static int
-flushbuflist( struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
+flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
     int slptimeo)
 {
 	struct buf *bp, *nbp;

==== //depot/projects/fadvise/sys/kern/vfs_syscalls.c#11 (text+ko) ====

@@ -4903,11 +4903,12 @@
 	case FADV_SEQUENTIAL:
 	case FADV_RANDOM:
 	case FADV_NOREUSE:
-		mtx_pool_lock(mtxpool_sleep, fp);
 		/*
-		 * See if we can merge with the existing non-standard
-		 * region.
+		 * Try to merge any existing non-standard region with
+		 * this new region if possible, otherwise create a new
+		 * non-standard region for this request.
 		 */
+		mtx_pool_lock(mtxpool_sleep, fp);
 		if (fp->f_advice == uap->advice &&
 		    ((fp->f_advstart <= end && fp->f_advend >= uap->offset) ||
 		    (fp->f_advstart != 0 && fp->f_advstart == end + 1) ||


More information about the p4-projects mailing list