diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2024-07-13 14:37:57 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2024-07-13 14:37:57 +0000 |
commit | b5c834f53df05d3dfea58c854b962c06ddd71746 (patch) | |
tree | e6b8c8f13d8377c2ff6dfb1a2cf12e0b60a9aa74 /sys/ufs | |
parent | a873ce0ac2c469debc5ecef589ba33a9b2d62376 (diff) |
Revert the vdoom change, while it prevents the crashes on joel's go
builder and avoids the ufs_inactive problems, bluhm hits panics on
shutdown and filesystem unmount on the regress testers.
We'll have to try the other approach of detecting the corrupted
vnode perhaps.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_inode.c | 16 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_inode.c | 14 |
2 files changed, 7 insertions, 23 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c index 3bbe98b6688..432dd5f12f0 100644 --- a/sys/ufs/ext2fs/ext2fs_inode.c +++ b/sys/ufs/ext2fs/ext2fs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_inode.c,v 1.67 2024/07/12 08:15:19 beck Exp $ */ +/* $OpenBSD: ext2fs_inode.c,v 1.68 2024/07/13 14:37:56 beck Exp $ */ /* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */ /* @@ -105,28 +105,20 @@ ext2fs_inactive(void *v) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); struct timespec ts; - int recycle_vnode = 0; int error = 0; #ifdef DIAGNOSTIC extern int prtactive; - if (prtactive && vp->v_usecount != 0) + if (prtactive && vp->v_usecount != 0) vprint("ext2fs_inactive: pushing active", vp); #endif /* Get rid of inodes related to stale file handles. */ - if (ip->i_e2din == NULL || ip->i_e2fs_mode == 0 || ip->i_e2fs_dtime) { - recycle_vnode = 1; - vdoom(vp); + if (ip->i_e2din == NULL || ip->i_e2fs_mode == 0 || ip->i_e2fs_dtime) goto out; - } error = 0; if (ip->i_e2fs_nlink == 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { - /* lock this vnode and promise to vclean it */ - recycle_vnode = 1; - vdoom(vp); - if (ext2fs_size(ip) != 0) { error = ext2fs_truncate(ip, (off_t)0, 0, NOCRED); } @@ -144,7 +136,7 @@ out: * If we are done with the inode, reclaim it * so that it can be reused immediately. */ - if (recycle_vnode) + if (ip->i_e2din == NULL || ip->i_e2fs_dtime != 0) vrecycle(vp, ap->a_p); return (error); } diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 67182ceb655..5e66f0bf26c 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_inode.c,v 1.46 2024/07/12 08:15:19 beck Exp $ */ +/* $OpenBSD: ufs_inode.c,v 1.47 2024/07/13 14:37:56 beck Exp $ */ /* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */ /* @@ -63,7 +63,6 @@ ufs_inactive(void *v) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); mode_t mode; - int recycle_vnode = 0; int error = 0; #ifdef DIAGNOSTIC extern int prtactive; @@ -75,17 +74,10 @@ ufs_inactive(void *v) /* * Ignore inodes related to stale file handles. */ - if (ip->i_din1 == NULL || DIP(ip, mode) == 0) { - recycle_vnode = 1; - vdoom(vp); + if (ip->i_din1 == NULL || DIP(ip, mode) == 0) goto out; - } if (DIP(ip, nlink) <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { - /* lock this vnode and promise to vclean it */ - recycle_vnode = 1; - vdoom(vp); - if (getinoquota(ip) == 0) (void)ufs_quota_free_inode(ip, NOCRED); @@ -109,7 +101,7 @@ out: * If we are done with the inode, reclaim it * so that it can be reused immediately. */ - if (recycle_vnode) + if (ip->i_din1 == NULL || DIP(ip, mode) == 0) vrecycle(vp, ap->a_p); return (error); |