From e3375d7b799430c44dd4d3a1c25d35103ca68b27 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Mon, 30 Apr 2012 13:40:06 -0400 Subject: [PATCH] --- yaml --- r: 308565 b: refs/heads/master c: 3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c h: refs/heads/master i: 308563: 904a71b93000e8354952f1dc76b82be76c91abe6 v: v3 --- [refs] | 2 +- trunk/fs/nfs/direct.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ff6175c9ff35..3af0ef0fc367 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 71e8cc00c63e8518ce86b4079355fc9086a4869d +refs/heads/master: 3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c diff --git a/trunk/fs/nfs/direct.c b/trunk/fs/nfs/direct.c index f30d5c26a763..af02bde7741e 100644 --- a/trunk/fs/nfs/direct.c +++ b/trunk/fs/nfs/direct.c @@ -292,7 +292,7 @@ static void nfs_direct_read_completion(struct nfs_pgio_header *hdr) 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 @@ static void nfs_direct_write_completion(struct nfs_pgio_header *hdr) 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, };