Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/cd9660/cd9660_vfsops.c
Show First 20 Lines • Show All 667 Lines • ▼ Show 20 Lines | cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) | ||||
struct vnode **vpp; | struct vnode **vpp; | ||||
int relocated; | int relocated; | ||||
struct iso_directory_record *isodir; | struct iso_directory_record *isodir; | ||||
{ | { | ||||
struct iso_mnt *imp; | struct iso_mnt *imp; | ||||
struct iso_node *ip; | struct iso_node *ip; | ||||
struct buf *bp; | struct buf *bp; | ||||
struct vnode *vp; | struct vnode *vp; | ||||
struct cdev *dev; | |||||
int error; | int error; | ||||
struct thread *td; | struct thread *td; | ||||
td = curthread; | td = curthread; | ||||
error = vfs_hash_get(mp, ino, flags, td, vpp, cd9660_vfs_hash_cmp, | error = vfs_hash_get(mp, ino, flags, td, vpp, cd9660_vfs_hash_cmp, | ||||
&ino); | &ino); | ||||
if (error || *vpp != NULL) | if (error || *vpp != NULL) | ||||
return (error); | return (error); | ||||
Show All 10 Lines | cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) | ||||
/* | /* | ||||
* We do not lock vnode creation as it is believed to be too | * We do not lock vnode creation as it is believed to be too | ||||
* expensive for such rare case as simultaneous creation of vnode | * expensive for such rare case as simultaneous creation of vnode | ||||
* for same ino by different processes. We just allow them to race | * for same ino by different processes. We just allow them to race | ||||
* and check later to decide who wins. Let the race begin! | * and check later to decide who wins. Let the race begin! | ||||
*/ | */ | ||||
imp = VFSTOISOFS(mp); | imp = VFSTOISOFS(mp); | ||||
dev = imp->im_dev; | |||||
/* Allocate a new vnode/iso_node. */ | /* Allocate a new vnode/iso_node. */ | ||||
if ((error = getnewvnode("isofs", mp, &cd9660_vnodeops, &vp)) != 0) { | if ((error = getnewvnode("isofs", mp, &cd9660_vnodeops, &vp)) != 0) { | ||||
*vpp = NULLVP; | *vpp = NULLVP; | ||||
return (error); | return (error); | ||||
} | } | ||||
ip = malloc(sizeof(struct iso_node), M_ISOFSNODE, | ip = malloc(sizeof(struct iso_node), M_ISOFSNODE, | ||||
M_WAITOK | M_ZERO); | M_WAITOK | M_ZERO); | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |