* [PATCH 1/4] Cleanup read_pages()
@ 2006-10-30 20:03 OGAWA Hirofumi
0 siblings, 0 replies; only message in thread
From: OGAWA Hirofumi @ 2006-10-30 20:03 UTC (permalink / raw)
To: akpm, Trond.Myklebust, miklos, sfrench, cluster-devel; +Cc: linux-kernel
Current read_pages() assume ->readpages() frees the passed pages.
This patch free the pages in ->read_pages(), if those were remaining
in the pages_list. So, readpages() just can ignore the remaining
pages in pages_list.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
mm/readahead.c | 2 ++
1 file changed, 2 insertions(+)
diff -puN mm/readahead.c~readpages-fixes mm/readahead.c
--- linux-2.6/mm/readahead.c~readpages-fixes 2006-10-31 04:45:38.000000000 +0900
+++ linux-2.6-hirofumi/mm/readahead.c 2006-10-31 04:46:37.000000000 +0900
@@ -167,6 +167,8 @@ static int read_pages(struct address_spa
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;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-30 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-30 20:03 [PATCH 1/4] Cleanup read_pages() OGAWA Hirofumi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®