mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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
This commit is contained in:
parent
09ac4e68f3
commit
bafa6cfc93
1 changed files with 4 additions and 0 deletions
|
|
@ -1345,6 +1345,10 @@ mark_atime:
|
|||
vfs_mark_atime(vp, cred);
|
||||
|
||||
done:
|
||||
if (error != 0 && *writecounted) {
|
||||
*writecounted = FALSE;
|
||||
vnode_pager_update_writecount(obj, objsize, 0);
|
||||
}
|
||||
vput(vp);
|
||||
return (error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue