summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-10-14 19:44:51 +0000
committermckusick <mckusick@FreeBSD.org>2002-10-14 19:44:51 +0000
commit05ff8976a7d08218b1fd02fb650366f2deaa8765 (patch)
treec744fd5eeabc6ec7e588b431ace50cad46844fde /sys/kern/vfs_subr.c
parente19a397f04cf447681a765daf2ac2ee7d9bfdb08 (diff)
downloadFreeBSD-src-05ff8976a7d08218b1fd02fb650366f2deaa8765.zip
FreeBSD-src-05ff8976a7d08218b1fd02fb650366f2deaa8765.tar.gz
Unconditionally reset vp->v_vnlock back to the default in the
vclean() function (e.g., vp->v_vnlock = &vp->v_lock) rather than requiring filesystems that use alternate locks to do so in their vop_reclaim functions. This change is a further cleanup of the vop_stdlock interface. Submitted by: Poul-Henning Kamp <phk@critter.freebsd.dk> Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 4fe7deb..579f08d 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2545,8 +2545,10 @@ vclean(vp, flags, td)
vfree(vp);
/*
- * Done with purge, notify sleepers of the grim news.
+ * Done with purge, reset to the standard lock and
+ * notify sleepers of the grim news.
*/
+ vp->v_vnlock = &vp->v_lock;
vp->v_op = dead_vnodeop_p;
if (vp->v_pollinfo != NULL)
vn_pollgone(vp);
OpenPOWER on IntegriCloud