Trond Myklebust wrote:
>
> +int
> +nfs_readpages(struct file *filp, struct address_space *mapping,
> + struct list_head *pages, unsigned nr_pages)
> +{
> + LIST_HEAD(head);
> + struct nfs_readdesc desc = {
> + .filp = filp,
> + .head = &head,
> + };
> + struct nfs_server *server = NFS_SERVER(mapping->host);
> + int is_sync = server->rsize < PAGE_CACHE_SIZE;
> + int ret;
> +
> + ret = read_cache_pages(mapping, pages,
> + is_sync ? readpage_sync_filler :
> + readpage_async_filler,
> + &desc);
> + if (!list_empty(pages)) {
> + struct page *page = list_entry(pages->prev, struct page, list);
> + list_del(&page->list);
> + page_cache_release(page);
> + }
What are the above few lines doing? Looks odd.
Or should it be
while (!list_empty(...))
?
> + if (!list_empty(&head)) {
> + int err = nfs_pagein_list(&head, server->rpages);
> + if (!ret)
> + ret = err;
> + }
> + return ret;
> +}
> +
-
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/
This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:42 EST