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:
parent
9f47e5fdda
commit
470cce5085
1 changed files with 6 additions and 3 deletions
|
|
@ -756,8 +756,13 @@ struct inode;
|
|||
*/
|
||||
static inline int put_page_testzero(struct page *page)
|
||||
{
|
||||
int ret;
|
||||
|
||||
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_pinner_put_page(page);
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue