summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r--sys/fs/nullfs/null_vnops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 3ab3a6f..fe4b740 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;
OpenPOWER on IntegriCloud