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.