aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ntfs
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2006-01-17 17:29:03 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2006-01-17 17:29:03 +0000
commit92e73f5711f62acfb32f1c05600904e13d6aa0e9 (patch)
tree8c53b5780d1f21ba97c11f102413f8370e4d4ca0 /sys/fs/ntfs
parent2971d7ab9b2b94937fa79d7a1e299f96cb339542 (diff)
downloadsrc-92e73f5711f62acfb32f1c05600904e13d6aa0e9.tar.gz
src-92e73f5711f62acfb32f1c05600904e13d6aa0e9.zip
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
Notes
Notes: svn path=/head/; revision=154487
Diffstat (limited to 'sys/fs/ntfs')
-rw-r--r--sys/fs/ntfs/ntfs_vnops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c
index d5a017fe76ca..86c883b39910 100644
--- a/sys/fs/ntfs/ntfs_vnops.c
+++ b/sys/fs/ntfs/ntfs_vnops.c
@@ -248,6 +248,11 @@ ntfs_reclaim(ap)
if (ntfs_prtactive && vrefcnt(vp) != 0)
vprint("ntfs_reclaim: pushing active", vp);
+ /*
+ * Destroy the vm object and flush associated pages.
+ */
+ vnode_destroy_vobject(vp);
+
if ((error = ntfs_ntget(ip)) != 0)
return (error);
@@ -255,7 +260,6 @@ ntfs_reclaim(ap)
ntfs_frele(fp);
ntfs_ntput(ip);
vp->v_data = NULL;
- vnode_destroy_vobject(vp);
return (0);
}