diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-17 12:00:05 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-17 12:00:05 +0000 |
commit | ba7310532462e8ae2566b1f4d7e7b86908d95df2 (patch) | |
tree | 23df99005fb8d74da8676a3f8559baaebdf02623 /sys/fs/nullfs | |
parent | 23d15e852d9025a0ee021e6f7786a97ec745e8ff (diff) | |
download | src-ba7310532462e8ae2566b1f4d7e7b86908d95df2.tar.gz src-ba7310532462e8ae2566b1f4d7e7b86908d95df2.zip |
- Lock the clearing of v_data so it is safe to inspect it with the
interlock.
Sponsored by: Isilon Systems, Inc.
Notes
Notes:
svn path=/head/; revision=143744
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 3ab3a6f876d7..fe4b740d5e43 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -627,12 +627,18 @@ null_reclaim(struct vop_reclaim_args *ap) struct vnode *lowervp = xp->null_lowervp; struct lock *vnlock; + /* + * Use the interlock to protect the clearing of v_data to + * prevent faults in null_lock(). + */ + VI_LOCK(vp); + vp->v_data = NULL; + VI_UNLOCK(vp); if (lowervp) { null_hashrem(xp); vrele(lowervp); } - vp->v_data = NULL; vp->v_object = NULL; vnlock = vp->v_vnlock; vp->v_vnlock = &vp->v_lock; |