1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

Remove an unnecessary call to pmap_remove_all() and the associated "XXX"

comments from vnode_pager_setsize().  This call was introduced in
revision 1.140 to address a problem that no longer exists.
Specifically, pmap_zero_page_area() has replaced a (possibly)
problematic implementation of page zeroing that was based on
vm_pager_map(), bzero(), and vm_pager_unmap().
This commit is contained in:
Alan Cox 2007-11-22 20:01:38 +00:00
parent e805d32b8e
commit 82cfdd5adc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173846

View File

@ -394,21 +394,6 @@ vnode_pager_setsize(vp, nsize)
*/
pmap_zero_page_area(m, base, size);
/*
* XXX work around SMP data integrity race
* by unmapping the page from user processes.
* The garbage we just cleared may be mapped
* to a user process running on another cpu
* and this code is not running through normal
* I/O channels which handle SMP issues for
* us, so unmap page to synchronize all cpus.
*
* XXX should vm_pager_unmap_page() have
* dealt with this?
*/
vm_page_lock_queues();
pmap_remove_all(m);
/*
* Clear out partial-page dirty bits. This
* has the side effect of setting the valid
@ -422,6 +407,7 @@ vnode_pager_setsize(vp, nsize)
* bits. This would prevent bogus_page
* replacement from working properly.
*/
vm_page_lock_queues();
vm_page_set_validclean(m, base, size);
if (m->dirty != 0)
m->dirty = VM_PAGE_BITS_ALL;