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.