From 45d45c6cdeb9416736b2c81f5dc679d867298dc4 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Mon, 3 Nov 2003 04:46:19 +0000 Subject: [PATCH] Use VOP_UNLOCK/vrele instead of vput. td was erecived as a parameter and one cannot be sure it is equal to curthread. --- sys/gnu/ext2fs/ext2_vfsops.c | 6 ++++-- sys/gnu/fs/ext2fs/ext2_vfsops.c | 6 ++++-- sys/ufs/ffs/ffs_vfsops.c | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index c9544c163988..86559b845473 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -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); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index c9544c163988..86559b845473 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -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); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 4e6d0ea00331..68c0d7fa22ef 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -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);