diff options
-rw-r--r-- | sys/isofs/cd9660/cd9660_extern.h | 6 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 67 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.h | 14 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 11 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 59 |
5 files changed, 5 insertions, 152 deletions
diff --git a/sys/isofs/cd9660/cd9660_extern.h b/sys/isofs/cd9660/cd9660_extern.h index 952c7b1f643..48b842adce1 100644 --- a/sys/isofs/cd9660/cd9660_extern.h +++ b/sys/isofs/cd9660/cd9660_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_extern.h,v 1.12 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_extern.h,v 1.13 2013/06/02 01:07:39 deraadt Exp $ */ /* $NetBSD: cd9660_extern.h,v 1.1 1997/01/24 00:24:53 cgd Exp $ */ /*- @@ -109,7 +109,3 @@ int isochar(const u_char *, const u_char *, int, u_char *); int isofncmp(const u_char *, int, const u_char *, int, int); void isofntrans(u_char *, int, u_char *, u_short *, int, int, int); cdino_t isodirino(struct iso_directory_record *, struct iso_mnt *); -#ifdef ISODEVMAP -struct iso_dnode *iso_dmap(dev_t, cdino_t, int); -void iso_dunmap(dev_t); -#endif diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index 75bbe6d69f5..b473466afcc 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.c,v 1.22 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_node.c,v 1.23 2013/06/02 01:07:39 deraadt Exp $ */ /* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */ /*- @@ -61,12 +61,6 @@ struct iso_node **isohashtbl; u_long isohash; #define INOHASH(device, inum) (((device) + ((inum)>>12)) & isohash) -#ifdef ISODEVMAP -struct iso_node **idvhashtbl; -u_long idvhash; -#define DNOHASH(device, inum) (((device) + ((inum)>>12)) & idvhash) -#endif - extern int prtactive; /* 1 => print out reclaim of active vnodes */ static u_int cd9660_chars2ui(u_char *, int); @@ -80,68 +74,9 @@ cd9660_init(vfsp) { isohashtbl = hashinit(desiredvnodes, M_ISOFSMNT, M_WAITOK, &isohash); -#ifdef ISODEVMAP - idvhashtbl = hashinit(desiredvnodes / 8, M_ISOFSMNT, M_WAITOK, &idvhash); -#endif return (0); } -#ifdef ISODEVMAP -/* - * Enter a new node into the device hash list - */ -struct iso_dnode * -iso_dmap(device, inum, create) - dev_t device; - cdino_t inum; - int create; -{ - register struct iso_dnode **dpp, *dp, *dq; - - dpp = &idvhashtbl[DNOHASH(device, inum)]; - for (dp = *dpp;; dp = dp->d_next) { - if (dp == NULL) - return (NULL); - if (inum == dp->i_number && device == dp->i_dev) - return (dp); - } - - if (!create) - return (NULL); - - dp = malloc(sizeof(struct iso_dnode), M_CACHE, M_WAITOK); - dp->i_dev = dev; - dp->i_number = ino; - - if (dq = *dpp) - dq->d_prev = dp->d_next; - dp->d_next = dq; - dp->d_prev = dpp; - *dpp = dp; - - return (dp); -} - -void -iso_dunmap(device) - dev_t device; -{ - struct iso_dnode **dpp, *dp, *dq; - - for (dpp = idvhashtbl; dpp <= idvhashtbl + idvhash; dpp++) { - for (dp = *dpp; dp != NULL; dp = dq) { - dq = dp->d_next; - if (device == dp->i_dev) { - if (dq) - dq->d_prev = dp->d_prev; - *dp->d_prev = dq; - free(dp, M_CACHE); - } - } - } -} -#endif - /* * Use the device/inum pair to find the incore inode, and return a pointer * to it. If it is in core, but locked, wait for it. diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index 2a0a9e44f4c..7cec607ed85 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.h,v 1.18 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_node.h,v 1.19 2013/06/02 01:07:39 deraadt Exp $ */ /* $NetBSD: cd9660_node.h,v 1.15 1997/04/11 21:52:01 kleink Exp $ */ /*- @@ -52,18 +52,6 @@ typedef struct { dev_t iso_rdev; /* Major/Minor number for special */ } ISO_RRIP_INODE; -#ifdef ISODEVMAP -/* - * FOr device# (major,minor) translation table - */ -struct iso_dnode { - struct iso_dnode *d_next, **d_prev; /* hash chain */ - dev_t i_dev; /* device where dnode resides */ - cdino_t i_number; /* the identity of the inode */ - dev_t d_dev; /* device # for translation */ -}; -#endif - struct iso_node { struct iso_node *i_next, **i_prev; /* hash chain */ struct vnode *i_vnode; /* vnode associated with this inode */ diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 8b6f0e25bd6..692572108c5 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.63 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.64 2013/06/02 01:07:39 deraadt Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -588,11 +588,6 @@ cd9660_unmount(mp, mntflags, p) isomp = VFSTOISOFS(mp); -#ifdef ISODEVMAP - if (isomp->iso_ftype == ISO_FTYPE_RRIP) - iso_dunmap(isomp->im_dev); -#endif - isomp->im_devvp->v_specmountpoint = NULL; vn_lock(isomp->im_devvp, LK_EXCLUSIVE | LK_RETRY, p); error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p); @@ -930,10 +925,6 @@ retry: /* * if device, look at device number table for translation */ -#ifdef ISODEVMAP - if (dp = iso_dmap(dev, ino, 0)) - ip->inode.iso_rdev = dp->d_dev; -#endif vp->v_op = &cd9660_specvops; if ((nvp = checkalias(vp, ip->inode.iso_rdev, mp)) != NULL) { /* diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 1234eeffb53..f968153e89e 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.60 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.61 2013/06/02 01:07:39 deraadt Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -85,63 +85,6 @@ struct isoreaddir { int iso_uiodir(struct isoreaddir *, struct dirent *, off_t); int iso_shipdir(struct isoreaddir *); -#if 0 -/* - * Mknod vnode call - * Actually remap the device number - */ -int -cd9660_mknod(ndp, vap, cred, p) - struct nameidata *ndp; - struct ucred *cred; - struct vattr *vap; - struct proc *p; -{ -#ifndef ISODEVMAP - pool_put(&namei_pool, ndp->ni_pnbuf); - vput(ndp->ni_dvp); - vput(ndp->ni_vp); - return (EINVAL); -#else - register struct vnode *vp; - struct iso_node *ip; - struct iso_dnode *dp; - int error; - - vp = ndp->ni_vp; - ip = VTOI(vp); - - if (ip->i_mnt->iso_ftype != ISO_FTYPE_RRIP - || vap->va_type != vp->v_type - || (vap->va_type != VCHR && vap->va_type != VBLK)) { - pool_put(&namei_pool, ndp->ni_pnbuf); - vput(ndp->ni_dvp); - vput(ndp->ni_vp); - return (EINVAL); - } - - dp = iso_dmap(ip->i_dev,ip->i_number,1); - if (ip->inode.iso_rdev == vap->va_rdev || vap->va_rdev == VNOVAL) { - /* same as the unmapped one, delete the mapping */ - remque(dp); - free(dp, M_CACHE); - } else - /* enter new mapping */ - dp->d_dev = vap->va_rdev; - - /* - * Remove inode so that it will be reloaded by iget and - * checked to see if it is an alias of an existing entry - * in the inode cache. - */ - vput(vp); - vp->v_type = VNON; - vgone(vp); - return (0); -#endif -} -#endif - /* * Setattr call. Only allowed for block and character special devices. */ |