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
This commit is contained in:
parent
ee29b91274
commit
a113660ecf
@ -938,6 +938,7 @@ ext2_vget(mp, ino, vpp)
|
||||
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;
|
||||
|
@ -938,6 +938,7 @@ ext2_vget(mp, ino, vpp)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user