Use VOP_UNLOCK/vrele instead of vput. td was erecived as a parameter
and one cannot be sure it is equal to curthread.
This commit is contained in:
parent
cb3e210e30
commit
45d45c6cde
@ -605,13 +605,15 @@ loop:
|
||||
bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
|
||||
(int)fs->s_blocksize, NOCRED, &bp);
|
||||
if (error) {
|
||||
vput(vp);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vrele(vp);
|
||||
return (error);
|
||||
}
|
||||
ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
|
||||
EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip);
|
||||
brelse(bp);
|
||||
vput(vp);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vrele(vp);
|
||||
mtx_lock(&mntvnode_mtx);
|
||||
}
|
||||
mtx_unlock(&mntvnode_mtx);
|
||||
|
@ -605,13 +605,15 @@ loop:
|
||||
bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
|
||||
(int)fs->s_blocksize, NOCRED, &bp);
|
||||
if (error) {
|
||||
vput(vp);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vrele(vp);
|
||||
return (error);
|
||||
}
|
||||
ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
|
||||
EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip);
|
||||
brelse(bp);
|
||||
vput(vp);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vrele(vp);
|
||||
mtx_lock(&mntvnode_mtx);
|
||||
}
|
||||
mtx_unlock(&mntvnode_mtx);
|
||||
|
@ -531,7 +531,8 @@ loop:
|
||||
bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
|
||||
(int)fs->fs_bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
vput(vp);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vrele(vp);
|
||||
return (error);
|
||||
}
|
||||
ffs_load_inode(bp, ip, fs, ip->i_number);
|
||||
|
Loading…
x
Reference in New Issue
Block a user