Don't hold a reference to the disk vnode for each inode.

Eliminate cdev and vnode pointer to the disk from the inodes,
the mount holds everything we need.
This commit is contained in:
Poul-Henning Kamp 2005-03-15 21:09:52 +00:00
parent 3b97f388d8
commit e0251bbbe7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143668
3 changed files with 1 additions and 11 deletions

View File

@ -31,9 +31,7 @@
struct udf_node {
LIST_ENTRY(udf_node) le;
struct vnode *i_vnode;
struct vnode *i_devvp;
struct udf_mnt *udfmp;
struct cdev *i_dev;
ino_t hash_id;
long diroff;
struct file_entry *fentry;

View File

@ -598,8 +598,6 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
unode->i_vnode = vp;
unode->hash_id = ino;
unode->i_devvp = udfmp->im_devvp;
unode->i_dev = udfmp->im_dev;
unode->udfmp = udfmp;
vp->v_data = unode;
@ -639,7 +637,6 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
return (ENOMEM);
}
VREF(udfmp->im_devvp);
bcopy(bp->b_data, unode->fentry, size);
brelse(bp);

View File

@ -252,7 +252,6 @@ udf_getattr(struct vop_getattr_args *a)
node = VTON(vp);
fentry = node->fentry;
vap->va_fsid = dev2udev(node->i_dev);
vap->va_fileid = node->hash_id;
vap->va_mode = udf_permtomode(node);
vap->va_nlink = le16toh(fentry->link_cnt);
@ -802,7 +801,7 @@ udf_bmap(struct vop_bmap_args *a)
node = VTON(a->a_vp);
if (a->a_bop != NULL)
*a->a_bop = &node->i_devvp->v_bufobj;
*a->a_bop = &node->udfmp->im_devvp->v_bufobj;
if (a->a_bnp == NULL)
return (0);
if (a->a_runb)
@ -968,10 +967,6 @@ udf_reclaim(struct vop_reclaim_args *a)
if (unode != NULL) {
vfs_hash_remove(vp);
if (unode->i_devvp) {
vrele(unode->i_devvp);
unode->i_devvp = 0;
}
if (unode->fentry != NULL)
FREE(unode->fentry, M_UDFFENTRY);