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:
Alexander Kabaev 2003-11-03 04:46:19 +00:00
parent cb3e210e30
commit 45d45c6cde
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121925
3 changed files with 10 additions and 5 deletions

View File

@ -605,13 +605,15 @@ ext2_reload(mountp, cred, td)
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);

View File

@ -605,13 +605,15 @@ ext2_reload(mountp, cred, td)
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);

View File

@ -531,7 +531,8 @@ ffs_reload(mp, cred, td)
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);