summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_denode.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2006-01-17 17:29:03 +0000
committeralfred <alfred@FreeBSD.org>2006-01-17 17:29:03 +0000
commita0282ebc04163163dc358c05c9071f8b0f17a9eb (patch)
tree8c53b5780d1f21ba97c11f102413f8370e4d4ca0 /sys/fs/msdosfs/msdosfs_denode.c
parent7f6555d455f978875b3f40b757762978fed9e05c (diff)
downloadFreeBSD-src-a0282ebc04163163dc358c05c9071f8b0f17a9eb.zip
FreeBSD-src-a0282ebc04163163dc358c05c9071f8b0f17a9eb.tar.gz
I ran into an nfs client panic a couple of times in a row over the
last few days. I tracked it down to the fact that nfs_reclaim() is setting vp->v_data to NULL _before_ calling vnode_destroy_object(). After silence from the mailing list I checked further and discovered that ufs_reclaim() is unique among FreeBSD filesystems for calling vnode_destroy_object() early, long before tossing v_data or much of anything else, for that matter. The rest, including NFS, appear to be identical, as if they were just clones of one original routine. The enclosed patch fixes all file systems in essentially the same way, by moving the call to vnode_destroy_object() to early in the routine (before the call to vfs_hash_remove(), if any). I have only tested NFS, but I've now run for over eighteen hours with the patch where I wouldn't get past four or five without it. Submitted by: Frank Mayhar Requested by: Mohan Srinivasan MFC After: 1 week
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_denode.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c
index effc20b..e2dbc9b 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -549,6 +549,10 @@ msdosfs_reclaim(ap)
if (prtactive && vrefcnt(vp) != 0)
vprint("msdosfs_reclaim(): pushing active", vp);
/*
+ * Destroy the vm object and flush associated pages.
+ */
+ vnode_destroy_vobject(vp);
+ /*
* Remove the denode from its hash chain.
*/
vfs_hash_remove(vp);
@@ -560,7 +564,6 @@ msdosfs_reclaim(ap)
#endif
FREE(dep, M_MSDOSFSNODE);
vp->v_data = NULL;
- vnode_destroy_vobject(vp);
return (0);
}
OpenPOWER on IntegriCloud