diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index dbad89c8e427..b03ec1ba4d75 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) | |||
945 | 945 | ||
946 | static int nfs_flush_list(struct inode *inode, struct list_head *head, int npages, int how) | 946 | static int nfs_flush_list(struct inode *inode, struct list_head *head, int npages, int how) |
947 | { | 947 | { |
948 | LIST_HEAD(one_request); | 948 | struct nfs_pageio_descriptor desc; |
949 | int (*flush_one)(struct inode *, struct list_head *, int); | 949 | int (*flush_one)(struct inode *, struct list_head *, int); |
950 | struct nfs_page *req; | ||
951 | int wpages = NFS_SERVER(inode)->wpages; | 950 | int wpages = NFS_SERVER(inode)->wpages; |
952 | int wsize = NFS_SERVER(inode)->wsize; | 951 | int wsize = NFS_SERVER(inode)->wsize; |
953 | int error; | 952 | int error; |
@@ -961,16 +960,16 @@ static int nfs_flush_list(struct inode *inode, struct list_head *head, int npage | |||
961 | how |= FLUSH_STABLE; | 960 | how |= FLUSH_STABLE; |
962 | 961 | ||
963 | do { | 962 | do { |
964 | nfs_coalesce_requests(head, &one_request, wpages); | 963 | nfs_pageio_init(&desc, wsize); |
965 | req = nfs_list_entry(one_request.next); | 964 | nfs_pageio_add_list(&desc, head); |
966 | error = flush_one(inode, &one_request, how); | 965 | error = flush_one(inode, &desc.pg_list, how); |
967 | if (error < 0) | 966 | if (error < 0) |
968 | goto out_err; | 967 | goto out_err; |
969 | } while (!list_empty(head)); | 968 | } while (!list_empty(head)); |
970 | return 0; | 969 | return 0; |
971 | out_err: | 970 | out_err: |
972 | while (!list_empty(head)) { | 971 | while (!list_empty(head)) { |
973 | req = nfs_list_entry(head->next); | 972 | struct nfs_page *req = nfs_list_entry(head->next); |
974 | nfs_list_remove_request(req); | 973 | nfs_list_remove_request(req); |
975 | nfs_redirty_request(req); | 974 | nfs_redirty_request(req); |
976 | nfs_end_page_writeback(req->wb_page); | 975 | nfs_end_page_writeback(req->wb_page); |