Module Name:    src
Committed By:   hannken
Date:           Sun May 25 17:43:47 UTC 2014

Modified Files:
        src/sys/fs/puffs: puffs_vfsops.c

Log Message:
The pageflush_selector gets a vnode with v_interlock held.
Remove the mutex_enter()/mutex_exit() and simplify.

Hi christos...


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/fs/puffs/puffs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.111 src/sys/fs/puffs/puffs_vfsops.c:1.112
--- src/sys/fs/puffs/puffs_vfsops.c:1.111	Sat May 24 16:34:03 2014
+++ src/sys/fs/puffs/puffs_vfsops.c	Sun May 25 17:43:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vfsops.c,v 1.111 2014/05/24 16:34:03 christos Exp $	*/
+/*	$NetBSD: puffs_vfsops.c,v 1.112 2014/05/25 17:43:47 hannken Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.111 2014/05/24 16:34:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.112 2014/05/25 17:43:47 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -513,13 +513,8 @@ puffs_vfsop_statvfs(struct mount *mp, st
 static bool
 pageflush_selector(void *cl, struct vnode *vp)
 {
-	bool rv;
 
-	mutex_enter(vp->v_interlock);
-	rv = vp->v_type == VREG && !UVM_OBJ_IS_CLEAN(&vp->v_uobj);
-	mutex_exit(vp->v_interlock);
-
-	return rv;
+	return vp->v_type == VREG && !UVM_OBJ_IS_CLEAN(&vp->v_uobj);
 }
 
 static int

Reply via email to