---
name: "do_generic_mapping_read"
section: "9"
platform: "linux"
package: "linux-manual-2.6.18"
version: "2.6.18.dfsg.1-26etch2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/do_generic_mapping_read"
---

# do\_generic\_mapping\_read(9)

generic file read routine

## NAME

do\_generic\_mapping\_read - generic file read routine

## SYNOPSIS

**void do\_generic\_mapping\_read(struct address\_space \*** *mapping***, struct file\_ra\_state \*** *\_ra***, struct file \*** *filp***, loff\_t \*** *ppos***, read\_descriptor\_t \*** *desc***, read\_actor\_t** *actor***);**

## ARGUMENTS

*mapping*

address\_space to be read

*\_ra*

file's readahead state

*filp*

the file to read

*ppos*

current file position

*desc*

read\_descriptor

*actor*

read method

## DESCRIPTION

This is a generic file read routine, and uses the mapping-\>a\_ops-\>**readpage** function for the actual low-level stuff.

This is really ugly. But the goto's actually try to clarify some of the logic when it comes to error handling etc.

Note the struct file\* is only passed for the use of readpage. It may be NULL.

## COPYRIGHT
