Minor code reordering and documentation adjustments.
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Apr 2008 07:07:02 +0000 (07:07 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Apr 2008 07:07:02 +0000 (07:07 +0000)
sys/kern/kern_fork.c
sys/vm/swap_pager.c

index e6539c8..efb2e31 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
  * $FreeBSD: src/sys/kern/kern_fork.c,v 1.72.2.14 2003/06/26 04:15:10 silby Exp $
- * $DragonFly: src/sys/kern/kern_fork.c,v 1.73 2008/04/01 20:20:29 nth Exp $
+ * $DragonFly: src/sys/kern/kern_fork.c,v 1.74 2008/04/28 07:07:01 dillon Exp $
  */
 
 #include "opt_ktrace.h"
@@ -202,8 +202,8 @@ sys_lwp_create(struct lwp_create_args *uap)
        return (0);
 
 fail:
-       --p->p_nthreads;
        lwp_rb_tree_RB_REMOVE(&p->p_lwp_tree, lp);
+       --p->p_nthreads;
        /* lwp_dispose expects an exited lwp, and a held proc */
        lp->lwp_flag |= LWP_WEXIT;
        lp->lwp_thread->td_flags |= TDF_EXITING;
index 0283bce..8fc9236 100644 (file)
@@ -96,7 +96,7 @@
  *     @(#)swap_pager.c        8.9 (Berkeley) 3/21/94
  *
  * $FreeBSD: src/sys/vm/swap_pager.c,v 1.130.2.12 2002/08/31 21:15:55 dillon Exp $
- * $DragonFly: src/sys/vm/swap_pager.c,v 1.28 2008/03/20 06:02:50 dillon Exp $
+ * $DragonFly: src/sys/vm/swap_pager.c,v 1.29 2008/04/28 07:07:02 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -1746,16 +1746,9 @@ swp_pager_async_iodone(struct bio *bio)
                        }
                } else {
                        /*
-                        * For write success, clear the modify and dirty 
-                        * status, then finish the I/O ( which decrements the 
-                        * busy count and possibly wakes waiter's up ).
+                        * Mark the page clean, but note that the dirty
+                        * bit may have been set in any of the page's pmaps.
                         */
-                       /* 
-                        * NOTE: can't call pmap_clear_modify(m) from an
-                        * interrupt thread, the pmap code may have to map
-                        * non-kernel pmaps and currently asserts the case.
-                        */
-                       /*pmap_clear_modify(m);*/
                        vm_page_undirty(m);
                        vm_page_io_finish(m);
                        if (!vm_page_count_severe() || !vm_page_try_to_cache(m))