---
name: "find_lock_entry"
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/find_lock_entry"
---

# find\_lock\_entry(9)

locate, pin and lock a page cache entry

## NAME

find\_lock\_entry - locate, pin and lock a page cache entry

## SYNOPSIS

**struct page \* find\_lock\_entry(struct address\_space \*** *mapping***, pgoff\_t** *offset***);**

## ARGUMENTS

*mapping*

the address\_space to search

*offset*

the page cache index

## DESCRIPTION

Looks up the page cache slot at *mapping* & *offset*. If there is a page cache page, it is returned locked and with an increased refcount.

If the slot holds a shadow entry of a previously evicted page, or a swap entry from shmem/tmpfs, it is returned.

Otherwise, **NULL** is returned.

**find\_lock\_entry** may sleep.

## COPYRIGHT
