Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/ufs/lfs Pull up lfs_vunref fix from the trunk.
details: https://anonhg.NetBSD.org/src/rev/7febd5bfe62c
branches: netbsd-1-5
changeset: 488233:7febd5bfe62c
user: perseant <perseant%NetBSD.org@localhost>
date: Thu Jun 22 20:26:19 2000 +0000
description:
Pull up lfs_vunref fix from the trunk.
diffstat:
sys/ufs/lfs/lfs_alloc.c | 4 ++--
sys/ufs/lfs/lfs_segment.c | 6 +-----
sys/ufs/lfs/lfs_syscalls.c | 13 ++++++++++---
sys/ufs/lfs/lfs_vnops.c | 4 ++--
4 files changed, 15 insertions(+), 12 deletions(-)
diffs (97 lines):
diff -r e150358bfaa1 -r 7febd5bfe62c sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Thu Jun 22 17:34:42 2000 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Thu Jun 22 20:26:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.34 2000/06/06 20:19:15 perseant Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.34.2.1 2000/06/22 20:26:19 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -232,7 +232,7 @@
*ap->a_vpp = vp;
if(!(vp->v_flag & VDIROP)) {
- lfs_vref(vp);
+ (void)lfs_vref(vp);
++lfs_dirvcount;
}
vp->v_flag |= VDIROP;
diff -r e150358bfaa1 -r 7febd5bfe62c sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Thu Jun 22 17:34:42 2000 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Thu Jun 22 20:26:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.49 2000/06/06 20:19:16 perseant Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.49.2.1 2000/06/22 20:26:19 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1747,10 +1747,6 @@
simple_unlock(&vp->v_interlock);
return;
}
-#ifdef DIAGNOSTIC
- if(VOP_ISLOCKED(vp))
- panic("lfs_vunref: vnode locked");
-#endif
/*
* insert at tail of LRU list
*/
diff -r e150358bfaa1 -r 7febd5bfe62c sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c Thu Jun 22 17:34:42 2000 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c Thu Jun 22 20:26:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_syscalls.c,v 1.41 2000/03/30 12:41:13 augustss Exp $ */
+/* $NetBSD: lfs_syscalls.c,v 1.41.4.1 2000/06/22 20:26:19 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -638,6 +638,11 @@
vp = ufs_ihashlookup(ump->um_dev, blkp->bi_inode);
if (vp != NULL && !(vp->v_flag & VXLOCK)) {
ip = VTOI(vp);
+ if (lfs_vref(vp)) {
+ v_daddr = LFS_UNUSED_DADDR;
+ need_unlock = 0;
+ continue;
+ }
if(VOP_ISLOCKED(vp)) {
/* printf("lfs_bmapv: inode %d inlocked\n",ip->i_number); */
need_unlock = 0;
@@ -646,7 +651,6 @@
need_unlock = FVG_UNLOCK;
numlocked++;
}
- lfs_vref(vp);
numrefed++;
} else {
error = VFS_VGET(mntp, blkp->bi_inode, &vp);
@@ -917,7 +921,10 @@
#endif
}
ip = VTOI(*vpp);
- lfs_vref(*vpp);
+ if (lfs_vref(*vpp)) {
+ clean_inlocked++;
+ return EAGAIN;
+ }
if (VOP_ISLOCKED(*vpp)) {
printf("lfs_fastvget: ino %d inlocked by pid %d\n",ip->i_number,
(*vpp)->v_lock.lk_lockholder);
diff -r e150358bfaa1 -r 7febd5bfe62c sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Thu Jun 22 17:34:42 2000 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Thu Jun 22 20:26:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.38 2000/05/31 01:40:02 perseant Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.38.2.1 2000/06/22 20:26:20 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -337,7 +337,7 @@
#define MARK_VNODE(dvp) do { \
if (!((dvp)->v_flag & VDIROP)) { \
- lfs_vref(dvp); \
+ (void)lfs_vref(dvp); \
++lfs_dirvcount; \
} \
(dvp)->v_flag |= VDIROP; \
Home |
Main Index |
Thread Index |
Old Index