mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
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>
This commit is contained in:
parent
71e8cc00c6
commit
3e9e0ca3f1
1 changed files with 15 additions and 3 deletions
|
@ -292,7 +292,7 @@ out_put:
|
||||||
hdr->release(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;
|
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 = {
|
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,
|
.init_hdr = nfs_direct_pgio_init,
|
||||||
.completion = nfs_direct_read_completion,
|
.completion = nfs_direct_read_completion,
|
||||||
};
|
};
|
||||||
|
@ -775,8 +775,20 @@ out_put:
|
||||||
hdr->release(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 = {
|
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,
|
.init_hdr = nfs_direct_pgio_init,
|
||||||
.completion = nfs_direct_write_completion,
|
.completion = nfs_direct_write_completion,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue