Author: avg
Date: Sat Mar 23 08:59:34 2013
New Revision: 248645
URL: http://svnweb.freebsd.org/changeset/base/248645

Log:
  post mountroot event after a real/final root is mounted
  
  not every time an intermediate root (including the first devfs) is
  mounted.
  This is also consistent with waking up via root_mount_complete.
  
  Reviewed by:  jhb
  MFC after:    13 days

Modified:
  head/sys/kern/vfs_mountroot.c

Modified: head/sys/kern/vfs_mountroot.c
==============================================================================
--- head/sys/kern/vfs_mountroot.c       Sat Mar 23 08:57:54 2013        
(r248644)
+++ head/sys/kern/vfs_mountroot.c       Sat Mar 23 08:59:34 2013        
(r248645)
@@ -199,8 +199,6 @@ set_rootvnode(void)
        VREF(rootvnode);
 
        FILEDESC_XUNLOCK(p->p_fd);
-
-       EVENTHANDLER_INVOKE(mountroot);
 }
 
 static int
@@ -991,6 +989,8 @@ vfs_mountroot(void)
        atomic_store_rel_int(&root_mount_complete, 1);
        wakeup(&root_mount_complete);
        mtx_unlock(&mountlist_mtx);
+
+       EVENTHANDLER_INVOKE(mountroot);
 }
 
 static struct mntarg *
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to