]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Release the v_writecount reference on the vnode in case of error,
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 28 Mar 2013 06:39:27 +0000 (06:39 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 28 Mar 2013 06:39:27 +0000 (06:39 +0000)
commitbafa6cfc93c0c830530bfea34c1bb19cd2b24c76
tree1123040519467d7a18f383bba5f3ab5dc6ed1b5d
parent09ac4e68f3364a081187366d178ba8f0ae62ed6a
Release the v_writecount reference on the vnode in case of error,
before the vnode is vput() in vm_mmap_vnode().  Error return means
that there is no use reference on the vnode from the vm object
reference, and failing to restore v_writecount breaks the invariant
that v_writecount is less or equal to the usecount.

The situation observed when nfs client returns ESTALE for
VOP_GETATTR() after the open.

In collaboration with: pho
MFC after: 1 week
sys/vm/vm_mmap.c