]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Call swap_pager_freespace() from vm_object_page_remove().
authormarkj <markj@FreeBSD.org>
Thu, 25 Jun 2020 15:21:21 +0000 (15:21 +0000)
committermarkj <markj@FreeBSD.org>
Thu, 25 Jun 2020 15:21:21 +0000 (15:21 +0000)
commit6550f740c2925aab3ca885b12c602b3bbb088a38
treef2eb818e3db7e43535bab9fa2204e6c4d9db2cb8
parent3cffbb58d4142d9a656cd93f120a7e5330a6e711
Call swap_pager_freespace() from vm_object_page_remove().

All vm_object_page_remove() callers, except
linux_invalidate_mapping_pages() in the LinuxKPI, free swap space when
removing a range of pages from an object.  The LinuxKPI case appears to
be an unintentional omission that could result in leaked swap blocks, so
unconditionally free swap space in vm_object_page_remove() to protect
against similar bugs in the future.

Reviewed by: alc, kib
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25329
sys/dev/md/md.c
sys/fs/tmpfs/tmpfs_subr.c
sys/kern/uipc_shm.c
sys/vm/vm_map.c
sys/vm/vm_object.c