summaryrefslogtreecommitdiff
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-11-11 18:57:18 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-11-11 18:57:18 +0000
commitc7026242e519a07ccf9d3141b826a04e2a60c600 (patch)
tree21bf8fa79e3fb3348b16451884ec3b44b5389f71 /sys/msdosfs
parent494f96fddf425671b008805ec74f04ff47594757 (diff)
Initialize the de_lock. some KNF
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/msdosfs_denode.c11
-rw-r--r--sys/msdosfs/msdosfs_lookup.c5
-rw-r--r--sys/msdosfs/msdosfs_vnops.c6
3 files changed, 13 insertions, 9 deletions
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 79bc3119b96..457ba634089 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.9 1997/11/06 22:52:46 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.10 1997/11/11 18:57:16 niklas Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.22 1996/10/13 04:16:31 christos Exp $ */
/*-
@@ -119,8 +119,9 @@ msdosfs_hashins(dep)
struct denode *dep;
{
struct denode **depp, *deq;
-
- depp = &dehashtbl[DEHASH(dep->de_dev, dep->de_dirclust, dep->de_diroffset)];
+
+ depp = &dehashtbl[DEHASH(dep->de_dev, dep->de_dirclust,
+ dep->de_diroffset)];
if ((deq = *depp) != NULL)
deq->de_prev = &dep->de_next;
dep->de_next = deq;
@@ -204,8 +205,10 @@ deget(pmp, dirclust, diroffset, depp)
*depp = 0;
return (error);
}
- MALLOC(ldep, struct denode *, sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK);
+ MALLOC(ldep, struct denode *, sizeof(struct denode), M_MSDOSFSNODE,
+ M_WAITOK);
bzero((caddr_t)ldep, sizeof *ldep);
+ lockinit(&ldep->de_lock, PINOD, "denode", 0, 0);
nvp->v_data = ldep;
ldep->de_vnode = nvp;
ldep->de_flag = 0;
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index 9bb3aee0e37..eaaef5667b9 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_lookup.c,v 1.8 1997/11/06 05:58:57 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_lookup.c,v 1.9 1997/11/11 18:57:16 niklas Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.30 1996/10/25 23:14:08 cgd Exp $ */
/*-
@@ -165,7 +165,8 @@ msdosfs_lookup(v)
VOP_UNLOCK(pdp, 0, p);
error = vget(vdp, LK_EXCLUSIVE, p);
if (!error && lockparent && (flags & ISLASTCN))
- error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p);
+ error =
+ vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p);
} else {
error = vget(vdp, LK_EXCLUSIVE, p);
if (!lockparent || error || !(flags & ISLASTCN))
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index adfc01c9591..69b924aa763 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.13 1997/11/06 05:58:58 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.14 1997/11/11 18:57:17 niklas Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.48 1996/03/20 00:45:43 thorpej Exp $ */
/*-
@@ -1744,7 +1744,7 @@ msdosfs_lock(v)
struct vnode *vp = ap->a_vp;
return (lockmgr(&VTODE(vp)->de_lock, ap->a_flags, &vp->v_interlock,
- ap->a_p));
+ ap->a_p));
}
int
@@ -1757,7 +1757,7 @@ msdosfs_unlock(v)
struct vnode *vp = ap->a_vp;
return (lockmgr(&VTODE(vp)->de_lock, ap->a_flags | LK_RELEASE,
- &vp->v_interlock, ap->a_p));
+ &vp->v_interlock, ap->a_p));
}
int