summaryrefslogtreecommitdiffstats
path: root/sys/fs/hpfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/hpfs')
-rw-r--r--sys/fs/hpfs/hpfs.h6
-rw-r--r--sys/fs/hpfs/hpfs_hash.c3
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c10
-rw-r--r--sys/fs/hpfs/hpfs_vnops.c14
4 files changed, 13 insertions, 20 deletions
diff --git a/sys/fs/hpfs/hpfs.h b/sys/fs/hpfs/hpfs.h
index e1e8c0c..bd90ce4 100644
--- a/sys/fs/hpfs/hpfs.h
+++ b/sys/fs/hpfs/hpfs.h
@@ -386,12 +386,6 @@ MALLOC_DECLARE(M_HPFSNO);
#define HPTOV(h) ((struct vnode *)((h)->h_vp))
#define FID(f) (*((lsn_t *)(f)->fid_data))
-#define HASHINIT(a, b, c, d) hashinit((a), (b), (d))
-#define VOP__LOCK(a, b, c) VOP_LOCK((a), (b), (c))
-#define VOP__UNLOCK(a, b, c) VOP_UNLOCK((a), (b), (c))
-#define VGET(a, b, c) vget((a), (b), (c))
-#define VN_LOCK(a, b, c) vn_lock((a), (b), (c))
-
extern vop_t ** hpfs_vnodeop_p;
/* Hash routines, too small to be separate header */
diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c
index 5cc79cc..1c6601a 100644
--- a/sys/fs/hpfs/hpfs_hash.c
+++ b/sys/fs/hpfs/hpfs_hash.c
@@ -65,8 +65,7 @@ hpfs_hphashinit()
{
lockinit (&hpfs_hphash_lock, PINOD, "hpfs_hphashlock", 0, 0);
- hpfs_hphashtbl = HASHINIT(desiredvnodes, M_HPFSHASH, M_WAITOK,
- &hpfs_hphash);
+ hpfs_hphashtbl = hashinit(desiredvnodes, M_HPFSHASH, &hpfs_hphash);
mtx_init(&hpfs_hphash_mtx, "hpfs hphash", MTX_DEF);
}
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 6b95174..81f377a 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -238,16 +238,16 @@ hpfs_mountfs(devvp, mp, argsp, p)
if (ncount > 1 && devvp != rootvp)
return (EBUSY);
- VN_LOCK(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, p->td_proc->p_ucred, p, 0, 0);
- VOP__UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, 0, p);
if (error)
return (error);
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
- VN_LOCK(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
- VOP__UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, 0, p);
if (error)
return (error);
@@ -524,7 +524,7 @@ hpfs_vget(
hp->h_devvp = hpmp->hpm_devvp;
VREF(hp->h_devvp);
- error = VN_LOCK(vp, LK_EXCLUSIVE, p);
+ error = vn_lock(vp, LK_EXCLUSIVE, p);
if (error) {
vput(vp);
return (error);
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c
index 328ec03..7f0beaf 100644
--- a/sys/fs/hpfs/hpfs_vnops.c
+++ b/sys/fs/hpfs/hpfs_vnops.c
@@ -616,12 +616,12 @@ hpfs_inactive(ap)
vprint("hpfs_inactive: pushing active", vp);
if (hp->h_flag & H_INVAL) {
- VOP__UNLOCK(vp,0,ap->a_td);
+ VOP_UNLOCK(vp,0,ap->a_td);
vrecycle(vp, NULL, ap->a_td);
return (0);
}
- VOP__UNLOCK(vp,0,ap->a_td);
+ VOP_UNLOCK(vp,0,ap->a_td);
return (0);
}
@@ -1104,17 +1104,17 @@ hpfs_lookup(ap)
dprintf(("hpfs_lookup(0x%x,...): .. faked (0x%x)\n",
dhp->h_no, dhp->h_fn.fn_parent));
- VOP__UNLOCK(dvp,0,cnp->cn_thread);
+ VOP_UNLOCK(dvp,0,cnp->cn_thread);
error = VFS_VGET(hpmp->hpm_mp,
dhp->h_fn.fn_parent, ap->a_vpp);
if(error) {
- VOP__LOCK(dvp, 0, cnp->cn_thread);
+ VOP_LOCK(dvp, 0, cnp->cn_thread);
return(error);
}
if( lockparent && (flags & ISLASTCN) &&
- (error = VOP__LOCK(dvp, 0, cnp->cn_thread)) ) {
+ (error = VOP_LOCK(dvp, 0, cnp->cn_thread)) ) {
vput( *(ap->a_vpp) );
return (error);
}
@@ -1130,7 +1130,7 @@ hpfs_lookup(ap)
if ((error == ENOENT) && (flags & ISLASTCN) &&
(nameiop == CREATE || nameiop == RENAME)) {
if(!lockparent)
- VOP__UNLOCK(dvp, 0, cnp->cn_thread);
+ VOP_UNLOCK(dvp, 0, cnp->cn_thread);
cnp->cn_flags |= SAVENAME;
return (EJUSTRETURN);
}
@@ -1176,7 +1176,7 @@ hpfs_lookup(ap)
brelse(bp);
if(!lockparent || !(flags & ISLASTCN))
- VOP__UNLOCK(dvp, 0, cnp->cn_thread);
+ VOP_UNLOCK(dvp, 0, cnp->cn_thread);
if ((flags & MAKEENTRY) &&
(!(flags & ISLASTCN) ||
(nameiop != DELETE && nameiop != CREATE)))
OpenPOWER on IntegriCloud