Mercurial > illumos > illumos-gate
changeset 4016:6bbba7fb458e
6525694 T2000 hangs at boot with S10u3 and three qlc PCI-E cards installed
author | dhain |
---|---|
date | Thu, 12 Apr 2007 09:39:08 -0700 |
parents | 9a00a50342cd |
children | 03d59df3a040 |
files | usr/src/uts/common/fs/devfs/devfs_vnops.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/devfs/devfs_vnops.c Thu Apr 12 07:52:19 2007 -0700 +++ b/usr/src/uts/common/fs/devfs/devfs_vnops.c Thu Apr 12 09:39:08 2007 -0700 @@ -62,6 +62,7 @@ #include <fs/fs_subr.h> #include <sys/fs/dv_node.h> +#include <sys/sunndi.h> extern struct vattr dv_vattr_dir, dv_vattr_file; extern dev_t rconsdev; @@ -861,6 +862,7 @@ int error; struct vattr va; size_t bufsz; + int circ; ddv = VTODV(dvp); dcmn_err2(("devfs_readdir %s: offset %lld len %ld\n", @@ -882,6 +884,8 @@ /* Load the initial contents */ if (ddv->dv_flags & DV_BUILD) { + /* Lock the underlying devi structure */ + ndi_devi_enter(ddv->dv_devi, &circ); if (!rw_tryupgrade(&ddv->dv_contents)) { rw_exit(&ddv->dv_contents); rw_enter(&ddv->dv_contents, RW_WRITER); @@ -892,6 +896,7 @@ dv_filldir(ddv); rw_downgrade(&ddv->dv_contents); + ndi_devi_exit(ddv->dv_devi, circ); } soff = uiop->uio_loffset;