---
name: "add_to_page_cache_locked"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/add_to_page_cache_locked"
---

# add\_to\_page\_cache\_locked(9)

add a locked page to the pagecache

## NAME

add\_to\_page\_cache\_locked - add a locked page to the pagecache

## SYNOPSIS

**int add\_to\_page\_cache\_locked(struct page \*** *page***, struct address\_space \*** *mapping***, pgoff\_t** *offset***, gfp\_t** *gfp\_mask***);**

## ARGUMENTS

*page*

page to add

*mapping*

the page's address\_space

*offset*

page index

*gfp\_mask*

page allocation mode

## DESCRIPTION

This function is used to add a page to the pagecache. It must be locked. This function does not add the page to the LRU. The caller must do that.

## COPYRIGHT
