ANDROID: mm: page_pinner: record every put_page
There are some places using put_page_testzero instead of put_page. Thus, move page_pinner_put_page into put_page_testzero to catch all of put operations. Bug: 192475091 Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: If33b2a28ceb64e3ccab83990eac2c1cc291c3b08
This commit is contained in:
@@ -756,8 +756,13 @@ struct inode;
|
|||||||
*/
|
*/
|
||||||
static inline int put_page_testzero(struct page *page)
|
static inline int put_page_testzero(struct page *page)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
|
VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
|
||||||
return page_ref_dec_and_test(page);
|
ret = page_ref_dec_and_test(page);
|
||||||
|
page_pinner_put_page(page);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1233,8 +1238,6 @@ static inline void put_page(struct page *page)
|
|||||||
{
|
{
|
||||||
page = compound_head(page);
|
page = compound_head(page);
|
||||||
|
|
||||||
page_pinner_put_page(page);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For devmap managed pages we need to catch refcount transition from
|
* For devmap managed pages we need to catch refcount transition from
|
||||||
* 2 to 1, when refcount reach one it means the page is free and we
|
* 2 to 1, when refcount reach one it means the page is free and we
|
||||||
|
Reference in New Issue
Block a user