diff options
author | bde <bde@FreeBSD.org> | 1998-09-09 13:09:24 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-09-09 13:09:24 +0000 |
commit | d2c322d7f61dcae76e6fc0f30d2c6d329e820691 (patch) | |
tree | aee825bc8743c5d60ca3908119fbcdda893d4bdf /sys/gnu | |
parent | 9493c9f45d3862f89d0ba685732b5dd4ac014417 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 1 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 1 |
2 files changed, 2 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; diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 944ed70..a9cf8fb 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/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; |