diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-06-18 14:18:26 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-06-18 14:18:26 +0000 |
commit | 5dfcfafbbeced8c7eb98046c7579e4159c64a584 (patch) | |
tree | 2a0941d1aa3ca5a08b3f8d613baea6aee157ef32 | |
parent | a779108741773f537b19b297b48d424f780550d2 (diff) |
Under certain circumstances, ext2fs_inactive() can be called without a
backing dinode, in which case we just want to recycle the vnode.
Fixes a crash reported by reyk@, okay krw@, mickey@ and pat@.
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c index 03dfb174b57..83f4bf967a7 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.32 2006/01/09 12:43:17 pedro Exp $ */ +/* $OpenBSD: ext2fs_inode.c,v 1.33 2006/06/18 14:18:25 pedro Exp $ */ /* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */ /* @@ -125,7 +125,7 @@ ext2fs_inactive(v) #endif /* Get rid of inodes related to stale file handles. */ - if (ip->i_e2fs_mode == 0 || ip->i_e2fs_dtime != 0) + if (ip->i_e2din == NULL || ip->i_e2fs_mode == 0 || ip->i_e2fs_dtime) goto out; error = 0; @@ -147,7 +147,7 @@ out: * If we are done with the inode, reclaim it * so that it can be reused immediately. */ - if (ip->i_e2fs_dtime != 0) + if (ip->i_e2din == NULL || ip->i_e2fs_dtime != 0) vrecycle(vp, NULL, p); return (error); } |