kernel: make imagereclaim() skip notext pages (prevent it from blowing the mount cache)

imagereclaim would happily uncache pages from the mountcache (port/cache.c)
without ever getting a Image* released from it. simple fix, just check for
p->image->notext but make sure todo it under the page lock :)
This commit is contained in:
cinap_lenrek 2013-05-27 03:26:53 +02:00
parent 6025ad06da
commit 71a3ab3f13

View file

@ -333,7 +333,7 @@ imagereclaim(void)
*/ */
for(p = palloc.tail; p && p->image && (n<1000 || !imagealloc.free); p = p->prev) { for(p = palloc.tail; p && p->image && (n<1000 || !imagealloc.free); p = p->prev) {
if(p->ref == 0 && canlock(p)) { if(p->ref == 0 && canlock(p)) {
if(p->ref == 0) { if(p->ref == 0 && p->image && !p->image->notext) {
n++; n++;
uncachepage(p); uncachepage(p);
} }