X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Freadahead.c;h=23cb61a01c6e4123f313f5487a5942e7ee4c5fe4;hb=f2a2a7108aa0039ba7a5fe7a0d2ecef2219a7584;hp=aa7ec424656ab5708307c7731b269f925982fa95;hpb=fffcb480e4224f25c965b93fa65541bfc7dd732e;p=linux-2.6 diff --git a/mm/readahead.c b/mm/readahead.c index aa7ec42465..23cb61a01c 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -38,6 +38,7 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) ra->ra_pages = mapping->backing_dev_info->ra_pages; ra->prev_page = -1; } +EXPORT_SYMBOL_GPL(file_ra_state_init); /* * Return max readahead size for this inode in number-of-pages. @@ -172,6 +173,8 @@ static int read_pages(struct address_space *mapping, struct file *filp, if (mapping->a_ops->readpages) { ret = mapping->a_ops->readpages(filp, mapping, pages, nr_pages); + /* Clean up the remaining pages */ + put_pages_list(pages); goto out; }