PERFORCE change 150204 for review
Ed Schouten
ed at FreeBSD.org
Sun Sep 21 13:52:30 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150204
Change 150204 by ed at ed_dull on 2008/09/21 13:52:23
As discussed with kib@, move the vfs_timestamp call to
devfs_alloc, where it doesn't pick up any locks.
Affected files ...
.. //depot/projects/mpsafetty/sys/fs/devfs/devfs_devs.c#2 edit
.. //depot/projects/mpsafetty/sys/kern/kern_conf.c#5 edit
Differences ...
==== //depot/projects/mpsafetty/sys/fs/devfs/devfs_devs.c#2 (text+ko) ====
@@ -117,6 +117,7 @@
{
struct cdev_priv *cdp;
struct cdev *cdev;
+ struct timespec ts;
cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | M_WAITOK);
@@ -128,6 +129,9 @@
cdev->si_name = cdev->__si_namebuf;
LIST_INIT(&cdev->si_children);
+ vfs_timestamp(&ts);
+ cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts;
+
return (cdev);
}
==== //depot/projects/mpsafetty/sys/kern/kern_conf.c#5 (text+ko) ====
@@ -526,7 +526,6 @@
newdev(struct cdevsw *csw, int y, struct cdev *si)
{
struct cdev *si2;
- struct timespec ts;
dev_t udev;
mtx_assert(&devmtx, MA_OWNED);
@@ -542,10 +541,6 @@
}
si->si_drv0 = udev;
si->si_devsw = csw;
-
- vfs_timestamp(&ts);
- si->si_atime = si->si_mtime = si->si_ctime = ts;
-
LIST_INSERT_HEAD(&csw->d_devs, si, si_list);
return (si);
}
More information about the p4-projects
mailing list