aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-04-02 18:48:28 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-04-30 22:17:04 -0700
commitd8a5ad75cc4d577987964e37a4c43b1c648c201e (patch)
tree91604bf17f7a81cc60a214426c7ddca89bf4faee /fs/nfs/write.c
parent91e59c368c6ba5eed0369a085c42c9f270b97aa8 (diff)
NFS: Cleanup the coalescing code
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index dbad89c8e42..b03ec1ba4d7 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -945,9 +945,8 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how)
static int nfs_flush_list(struct inode *inode, struct list_head *head, int npages, int how)
{
- LIST_HEAD(one_request);
+ struct nfs_pageio_descriptor desc;
int (*flush_one)(struct inode *, struct list_head *, int);
- struct nfs_page *req;
int wpages = NFS_SERVER(inode)->wpages;
int wsize = NFS_SERVER(inode)->wsize;
int error;
@@ -961,16 +960,16 @@ static int nfs_flush_list(struct inode *inode, struct list_head *head, int npage
how |= FLUSH_STABLE;
do {
- nfs_coalesce_requests(head, &one_request, wpages);
- req = nfs_list_entry(one_request.next);
- error = flush_one(inode, &one_request, how);
+ nfs_pageio_init(&desc, wsize);
+ nfs_pageio_add_list(&desc, head);
+ error = flush_one(inode, &desc.pg_list, how);
if (error < 0)
goto out_err;
} while (!list_empty(head));
return 0;
out_err:
while (!list_empty(head)) {
- req = nfs_list_entry(head->next);
+ struct nfs_page *req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);