diff options
author | jhb <jhb@FreeBSD.org> | 2009-01-28 18:54:56 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-01-28 18:54:56 +0000 |
commit | 5ac3853a0d987803465d9315d7927e48e0562c1c (patch) | |
tree | 064e5241387f65106691f540da4935693ecc1600 /sys/fs/cd9660/cd9660_node.c | |
parent | 978b079757117da3ce6b3a04ba3767fa6dbbbf0c (diff) | |
download | FreeBSD-src-5ac3853a0d987803465d9315d7927e48e0562c1c.zip FreeBSD-src-5ac3853a0d987803465d9315d7927e48e0562c1c.tar.gz |
Mark cd9660 MPSAFE and add support for using shared vnode locks during
pathname lookups.
- Remove 'i_offset' and 'i_ino' from the ISO node structure and replace
them with local variables in the lookup routine instead.
- Cache a copy of 'i_diroff' for use during a lookup in a local variable.
- Save a copy of the found directory entry in a malloc'd buffer after a
successfull lookup before getting the vnode. This allows us to release
the buffer holding the directory block before calling vget() which
otherwise resulted in a LOR between "bufwait" and the vnode lock.
- Use an inlined version of vn_vget_ino() to handle races with ..
lookups. I had to inline the code here since cd9660 uses an internal
vget routine to save a disk I/O that would otherwise re-read the
directory block.
- Honor the requested locking flags during lookups to allow for shared
locking.
- Honor the requested locking flags passed to VFS_ROOT() and VFS_VGET()
similar to UFS.
- Don't make every ISO 9660 vnode hold a reference on the vnode of the
underlying device vnode of the mountpoint. The mountpoint already
holds a suitable reference.
Diffstat (limited to 'sys/fs/cd9660/cd9660_node.c')
-rw-r--r-- | sys/fs/cd9660/cd9660_node.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index 90be9f3..64d449e 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -92,7 +92,6 @@ cd9660_reclaim(ap) } */ *ap; { struct vnode *vp = ap->a_vp; - struct iso_node *ip = VTOI(vp); if (prtactive && vrefcnt(vp) != 0) vprint("cd9660_reclaim: pushing active", vp); @@ -108,8 +107,6 @@ cd9660_reclaim(ap) /* * Purge old data structures associated with the inode. */ - if (ip->i_mnt->im_devvp) - vrele(ip->i_mnt->im_devvp); free(vp->v_data, M_ISOFSNODE); vp->v_data = NULL; return (0); |