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

Trond Myklebust (trond.myklebust@fys.uio.no)
Wed, 6 Nov 2002 18:42:10 +0100


>>>>> 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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/