diff options
| author | Alan Cox <alc@FreeBSD.org> | 1999-08-12 06:33:56 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 1999-08-12 06:33:56 +0000 |
| commit | 58b4e6cc84d76f15d264fb959b50d9071a24d14e (patch) | |
| tree | d4354ba10722899d89a2eba869b5b9a96c2f0a36 | |
| parent | a18ff8bea76cfef2af67ccf8fc98e1966626d494 (diff) | |
Notes
| -rw-r--r-- | sys/vm/vm_object.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 91feed0bf12c..70a3defabef3 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.161 1999/08/01 06:05:09 alc Exp $ + * $Id: vm_object.c,v 1.162 1999/08/09 10:35:05 phk Exp $ */ /* @@ -766,16 +766,18 @@ relookup: tobject = object; tpindex = pindex; shadowlookup: - - if (tobject->type != OBJT_DEFAULT && - tobject->type != OBJT_SWAP - ) { - continue; + /* + * MADV_FREE only operates on OBJT_DEFAULT or OBJT_SWAP pages + * and those pages must be OBJ_ONEMAPPING. + */ + if (advise == MADV_FREE) { + if ((tobject->type != OBJT_DEFAULT && + tobject->type != OBJT_SWAP) || + (tobject->flags & OBJ_ONEMAPPING) == 0) { + continue; + } } - if ((tobject->flags & OBJ_ONEMAPPING) == 0) - continue; - m = vm_page_lookup(tobject, tpindex); if (m == NULL) { |
