mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Just return in the case of a page not on any queue in vm_page_unqueue().
Return VM_PAGE_BITS_ALL even if size > PAGE_SIZE in vm_page_bits(). Submitted by: John Dyson
This commit is contained in:
parent
26f5e3ab12
commit
5e716206c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6624
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_page.c,v 1.19 1995/02/20 13:58:14 davidg Exp $
|
||||
* $Id: vm_page.c,v 1.20 1995/02/20 14:00:50 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -548,8 +548,12 @@ vm_page_unqueue(vm_page_t mem)
|
||||
{
|
||||
int s, origflags;
|
||||
|
||||
s = splhigh();
|
||||
origflags = mem->flags;
|
||||
|
||||
if ((origflags & (PG_ACTIVE|PG_INACTIVE|PG_CACHE)) == 0)
|
||||
return origflags;
|
||||
|
||||
s = splhigh();
|
||||
if (mem->flags & PG_ACTIVE) {
|
||||
TAILQ_REMOVE(&vm_page_queue_active, mem, pageq);
|
||||
cnt.v_active_count--;
|
||||
@ -1055,7 +1059,7 @@ vm_page_bits(int base, int size)
|
||||
{
|
||||
u_short chunk;
|
||||
|
||||
if( (base == 0) && (size == PAGE_SIZE))
|
||||
if ((base == 0) && (size >= PAGE_SIZE))
|
||||
return VM_PAGE_BITS_ALL;
|
||||
size = (size + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1);
|
||||
base = (base % PAGE_SIZE) / DEV_BSIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user