aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2002-10-14 19:44:51 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2002-10-14 19:44:51 +0000
commite04a02006780cb3c56f7c97c8f97490c564f0884 (patch)
treec744fd5eeabc6ec7e588b431ace50cad46844fde /sys
parent03d94b50e5728fbc47a129e3c005f0b3d3f5a08c (diff)
downloadsrc-e04a02006780cb3c56f7c97c8f97490c564f0884.tar.gz
src-e04a02006780cb3c56f7c97c8f97490c564f0884.zip
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.
Notes
Notes: svn path=/head/; revision=105119
Diffstat (limited to 'sys')
-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 4fe7deb2f15b..579f08d99a30 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);