summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-10-09 18:43:29 +0000
committerkib <kib@FreeBSD.org>2013-10-09 18:43:29 +0000
commitd973ab2c238486eba90659984a91cc2843190d7f (patch)
tree8958f4651ac36cd4907b13e43c7a8b9548760115 /sys/kern
parent7ff487b3a2f97b08f82ffdc0b157adf5e886b4f7 (diff)
downloadFreeBSD-src-d973ab2c238486eba90659984a91cc2843190d7f.zip
FreeBSD-src-d973ab2c238486eba90659984a91cc2843190d7f.tar.gz
Do not flush buffers when the v_object of the passed vnode does not
really belong to it. Such vnodes, with the pointers to other vnodes v_objects, are typically instantiated by the bypass filesystems. Invalidating mappings of other vnode pages and the pages is wrong, since reclamation of the upper vnode does not imply that lower vnode is reclaimed too. One of the consequences of the improper reclamation was destruction of the wired mappings of the lower vnode pages, triggering miscellaneous assertions in the VM system. Reported by: John Marshall <john.marshall@riverwillow.com.au> Tested by: John Marshall <john.marshall@riverwillow.com.au>, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 930a3c8..91c64a3 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1315,6 +1315,8 @@ vinvalbuf(struct vnode *vp, int flags, int slpflag, int slptimeo)
CTR3(KTR_VFS, "%s: vp %p with flags %d", __func__, vp, flags);
ASSERT_VOP_LOCKED(vp, "vinvalbuf");
+ if (vp->v_object != NULL && vp->v_object->handle != vp)
+ return (0);
return (bufobj_invalbuf(&vp->v_bufobj, flags, slpflag, slptimeo));
}
OpenPOWER on IntegriCloud