summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs/ext2_vfsops.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-09-09 13:09:24 +0000
committerbde <bde@FreeBSD.org>1998-09-09 13:09:24 +0000
commitd2c322d7f61dcae76e6fc0f30d2c6d329e820691 (patch)
treeaee825bc8743c5d60ca3908119fbcdda893d4bdf /sys/gnu/ext2fs/ext2_vfsops.c
parent9493c9f45d3862f89d0ba685732b5dd4ac014417 (diff)
downloadFreeBSD-src-d2c322d7f61dcae76e6fc0f30d2c6d329e820691.zip
FreeBSD-src-d2c322d7f61dcae76e6fc0f30d2c6d329e820691.tar.gz
Don't forget to initialize the inode lock. This bug caused
surprisingly few problems. Most fields were initialized to the correct values by bzero(), but lk_prio was 0 instead of PINOD (=8), the lk_wmsg was NULL instead of "ext2in", and lk_lockholder was 0 instead of -1. Obtained from: Lite2 via the -current ffs_vfsops.c
Diffstat (limited to 'sys/gnu/ext2fs/ext2_vfsops.c')
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index 944ed70..a9cf8fb 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -938,6 +938,7 @@ restart:
return (error);
}
bzero((caddr_t)ip, sizeof(struct inode));
+ lockinit(&ip->i_lock, PINOD, "ext2in", 0, 0);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_e2fs = fs = ump->um_e2fs;
OpenPOWER on IntegriCloud