Re: [PATCH] Convert NFS client to use ->readpages()

Trond Myklebust
2002-11-06T18:55:27Z

>>>>> Andrew Morton <akpm@digeo.com> writes:

> Or should it be

> while (!list_empty(...))

Duh. No idea how that crept in.

Concerning your other query: the code is correct as it stands since
nfs_pagein_list() is guaranteed to drain the entire list.

--- linux-2.5.45-02-readpages2/fs/nfs/read.c.orig 2002-11-05 19:45:07.000000000 -0500
+++ linux-2.5.45-02-readpages2/fs/nfs/read.c 2002-11-06 12:35:06.000000000 -0500
@@ -387,7 +387,7 @@
is_sync ? readpage_sync_filler :
readpage_async_filler,
&desc);
- if (!list_empty(pages)) {
+ while (!list_empty(pages)) {
struct page *page = list_entry(pages->prev, struct page, list);
list_del(&page->list);
page_cache_release(page);