Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs ffs_reclaim: don't free an already free inode. ...
details: https://anonhg.NetBSD.org/src/rev/a2bf6cb7bd6e
branches: trunk
changeset: 757055:a2bf6cb7bd6e
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Aug 12 07:41:49 2010 +0000
description:
ffs_reclaim: don't free an already free inode. This may happen when
ffs_fhtovp() gets a free inode and releases it.
diffstat:
sys/ufs/ffs/ffs_vnops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r b94293f0a80e -r a2bf6cb7bd6e sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Thu Aug 12 06:17:14 2010 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Thu Aug 12 07:41:49 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.115 2010/07/28 11:03:48 hannken Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.116 2010/08/12 07:41:49 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.115 2010/07/28 11:03:48 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.116 2010/08/12 07:41:49 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -594,7 +594,8 @@
fstrans_done(mp);
return error;
}
- if (ip->i_nlink <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0)
+ if (ip->i_nlink <= 0 && ip->i_omode != 0 &&
+ (vp->v_mount->mnt_flag & MNT_RDONLY) == 0)
ffs_vfree(vp, ip->i_number, ip->i_omode);
UFS_WAPBL_END(mp);
if ((error = ufs_reclaim(vp)) != 0) {
Home |
Main Index |
Thread Index |
Old Index