Date: Sun, 21 Sep 2008 13:52:30 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 150204 for review Message-ID: <200809211352.m8LDqUnJ035314@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150204 Change 150204 by ed@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809211352.m8LDqUnJ035314>