fileobj, shmobj: free pages in object destructor (as opposed to page_unmap())
Change-Id: I3ea50fc13ae5c090ba32aad4461f9741a4c35665
This commit is contained in:
committed by
Dominique Martinet
parent
022e04b62b
commit
c1270cdf6d
@ -395,6 +395,7 @@ static void fileobj_free(struct memobj *memobj)
|
||||
phys, __func__, phys, PAGE_SIZE, PAGE_SIZE);
|
||||
rusage_memory_stat_mapped_file_sub(PAGE_SIZE,
|
||||
PAGE_SIZE);
|
||||
kfree(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1662,8 +1662,8 @@ int page_unmap(struct page *page)
|
||||
*/
|
||||
|
||||
dkprintf("page_unmap(%p %x %d): 1\n", page, page->mode, page->count);
|
||||
|
||||
list_del(&page->hash);
|
||||
kfree(page);
|
||||
ihk_mc_spinlock_unlock(&page_hash_locks[hash], irqflags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -277,6 +277,7 @@ static void shmobj_destroy(struct shmobj *obj)
|
||||
1UL << obj->pgshift);
|
||||
memory_stat_rss_sub(1UL << obj->pgshift,
|
||||
1UL << obj->pgshift);
|
||||
kfree(page);
|
||||
}
|
||||
#if 0
|
||||
dkprintf("shmobj_destroy(%p):"
|
||||
|
||||
Reference in New Issue
Block a user