diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-30 19:40:06 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-30 20:33:51 +0200 |
commit | 3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c (patch) | |
tree | 714ead9c8f9fb7334b876717f85aa80b33be8871 /fs/nfs/direct.c | |
parent | NFS: Ensure that we break out of read/write_schedule_segment on error (diff) | |
download | linux-3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c.tar.xz linux-3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c.zip |
NFS: O_DIRECT pgio_completion_ops error_cleanup must unlock the request
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
Diffstat (limited to '')
-rw-r--r-- | fs/nfs/direct.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index f30d5c26a763..af02bde7741e 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -292,7 +292,7 @@ out_put: hdr->release(hdr); } -static void nfs_sync_pgio_error(struct list_head *head) +static void nfs_read_sync_pgio_error(struct list_head *head) { struct nfs_page *req; @@ -309,7 +309,7 @@ static void nfs_direct_pgio_init(struct nfs_pgio_header *hdr) } static const struct nfs_pgio_completion_ops nfs_direct_read_completion_ops = { - .error_cleanup = nfs_sync_pgio_error, + .error_cleanup = nfs_read_sync_pgio_error, .init_hdr = nfs_direct_pgio_init, .completion = nfs_direct_read_completion, }; @@ -775,8 +775,20 @@ out_put: hdr->release(hdr); } +static void nfs_write_sync_pgio_error(struct list_head *head) +{ + struct nfs_page *req; + + while (!list_empty(head)) { + req = nfs_list_entry(head->next); + nfs_list_remove_request(req); + nfs_release_request(req); + nfs_unlock_request(req); + } +} + static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = { - .error_cleanup = nfs_sync_pgio_error, + .error_cleanup = nfs_write_sync_pgio_error, .init_hdr = nfs_direct_pgio_init, .completion = nfs_direct_write_completion, }; |