replace_page_cache_page — replace a pagecache page with a new one
|struct page * old,|
|struct page * new,|
struct page * old
page to be replaced
struct page * new
page to replace with
This function replaces a page in the pagecache with a new one. On success it acquires the pagecache reference for the new page and drops it for the old page. Both the old and new pages must be locked. This function does not add the new page to the LRU, the caller must do that.
The remove + add is atomic. The only way this function can fail is memory allocation failure.