summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-03 04:46:19 +0000
committerkan <kan@FreeBSD.org>2003-11-03 04:46:19 +0000
commitdb583b56578fac90b67c3c67d791f43fe8bf2958 (patch)
tree568a28c2eeb43f8cf4778b63640c4c7b0283a1b5
parent15df21071cf0254e3341176b8f9f44de62d20939 (diff)
downloadFreeBSD-src-db583b56578fac90b67c3c67d791f43fe8bf2958.zip
FreeBSD-src-db583b56578fac90b67c3c67d791f43fe8bf2958.tar.gz
Use VOP_UNLOCK/vrele instead of vput. td was erecived as a parameter
and one cannot be sure it is equal to curthread.
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c6
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index c9544c1..86559b8 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 c9544c1..86559b8 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 4e6d0ea..68c0d7f 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);
OpenPOWER on IntegriCloud