Revert r346608
That change was intended to be cosmetic, but it inadvertenly caused vnode_pager_setsize to discard cached indirect blocks and extended attributes on UFS during truncation. The reason is because those blocks have negative LBNs, which get sign-cast to positive VM indexes. Reported by: kib Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
07e86257e6
commit
6cb46f390d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=350092
@ -464,7 +464,8 @@ vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize)
|
||||
* File has shrunk. Toss any cached pages beyond the new EOF.
|
||||
*/
|
||||
if (nobjsize < object->size)
|
||||
vm_object_page_remove(object, nobjsize, 0, 0);
|
||||
vm_object_page_remove(object, nobjsize, object->size,
|
||||
0);
|
||||
/*
|
||||
* this gets rid of garbage at the end of a page that is now
|
||||
* only partially backed by the vnode.
|
||||
|
Loading…
Reference in New Issue
Block a user