Commit 88a88295 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] NFS: remove broken O_DIRECT wait code

It is in any case no longer needed.
parent f60d81b1
...@@ -123,7 +123,6 @@ nfs_iov2pagelist(int rw, const struct inode *inode, ...@@ -123,7 +123,6 @@ nfs_iov2pagelist(int rw, const struct inode *inode,
page_count = nfs_get_user_pages(user_addr, bytes, &pages, rw); page_count = nfs_get_user_pages(user_addr, bytes, &pages, rw);
if (page_count < 0) { if (page_count < 0) {
nfs_release_list(requests);
return page_count; return page_count;
} }
...@@ -201,7 +200,6 @@ do_nfs_direct_IO(int rw, const struct inode *inode, ...@@ -201,7 +200,6 @@ do_nfs_direct_IO(int rw, const struct inode *inode,
break; break;
} }
result = nfs_pagein_list(&requests, NFS_SERVER(inode)->rpages); result = nfs_pagein_list(&requests, NFS_SERVER(inode)->rpages);
nfs_wait_for_reads(&requests);
break; break;
case WRITE: case WRITE:
if (IS_SYNC(inode) || (NFS_SERVER(inode)->wsize < PAGE_SIZE)) if (IS_SYNC(inode) || (NFS_SERVER(inode)->wsize < PAGE_SIZE))
......
...@@ -153,26 +153,6 @@ nfs_release_request(struct nfs_page *req) ...@@ -153,26 +153,6 @@ nfs_release_request(struct nfs_page *req)
nfs_page_free(req); nfs_page_free(req);
} }
/**
* nfs_release_list - cleanly dispose of an unattached list of page requests
* @list: list of doomed page requests
*/
void
nfs_release_list(struct list_head *list)
{
while (!list_empty(list)) {
struct nfs_page *req = nfs_list_entry(list);
nfs_list_remove_request(req);
page_cache_release(req->wb_page);
/* Release struct file or cached credential */
nfs_clear_request(req);
nfs_page_free(req);
}
}
/** /**
* nfs_list_add_request - Insert a request into a sorted list * nfs_list_add_request - Insert a request into a sorted list
* @req: request * @req: request
...@@ -221,37 +201,6 @@ nfs_wait_on_request(struct nfs_page *req) ...@@ -221,37 +201,6 @@ nfs_wait_on_request(struct nfs_page *req)
return nfs_wait_event(clnt, req->wb_wait, !NFS_WBACK_BUSY(req)); return nfs_wait_event(clnt, req->wb_wait, !NFS_WBACK_BUSY(req));
} }
/**
* nfs_wait_for_reads - wait for outstanding requests to complete
* @head: list of page requests to wait for
*/
int
nfs_wait_for_reads(struct list_head *head)
{
struct list_head *p = head->next;
unsigned int res = 0;
while (p != head) {
struct nfs_page *req = nfs_list_entry(p);
int error;
if (!NFS_WBACK_BUSY(req))
continue;
req->wb_count++;
error = nfs_wait_on_request(req);
if (error < 0)
return error;
nfs_list_remove_request(req);
nfs_clear_request(req);
nfs_page_free(req);
p = head->next;
res++;
}
return res;
}
/** /**
* nfs_coalesce_requests - Split coalesced requests out from a list. * nfs_coalesce_requests - Split coalesced requests out from a list.
* @head: source list * @head: source list
......
...@@ -47,7 +47,6 @@ extern struct nfs_page *nfs_create_request(struct file *, struct inode *, ...@@ -47,7 +47,6 @@ extern struct nfs_page *nfs_create_request(struct file *, struct inode *,
unsigned int, unsigned int); unsigned int, unsigned int);
extern void nfs_clear_request(struct nfs_page *req); extern void nfs_clear_request(struct nfs_page *req);
extern void nfs_release_request(struct nfs_page *req); extern void nfs_release_request(struct nfs_page *req);
extern void nfs_release_list(struct list_head *list);
extern void nfs_list_add_request(struct nfs_page *, struct list_head *); extern void nfs_list_add_request(struct nfs_page *, struct list_head *);
...@@ -57,7 +56,6 @@ extern int nfs_scan_list(struct list_head *, struct list_head *, ...@@ -57,7 +56,6 @@ extern int nfs_scan_list(struct list_head *, struct list_head *,
extern int nfs_coalesce_requests(struct list_head *, struct list_head *, extern int nfs_coalesce_requests(struct list_head *, struct list_head *,
unsigned int); unsigned int);
extern int nfs_wait_on_request(struct nfs_page *); extern int nfs_wait_on_request(struct nfs_page *);
extern int nfs_wait_for_reads(struct list_head *);
extern spinlock_t nfs_wreq_lock; extern spinlock_t nfs_wreq_lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment