summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-13 10:39:39 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-20 15:14:20 -0500
commitdf3accb849607a86278a37c35e6b313635ccc48b (patch)
tree998e41f6734bdddacfd90ba24469027d5288fe8e /fs/nfs/pagelist.c
parent078b5fd92c4913dd367361db6c28568386077c89 (diff)
downloadlinux-stable-df3accb849607a86278a37c35e6b313635ccc48b.tar.gz
linux-stable-df3accb849607a86278a37c35e6b313635ccc48b.tar.bz2
linux-stable-df3accb849607a86278a37c35e6b313635ccc48b.zip
NFS: Pass error information to the pgio error cleanup routine
Allow the caller to pass error information when cleaning up a failed I/O request so that we can conditionally take action to cancel the request altogether if the error turned out to be fatal. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 9cbfdb979992..695afb7de3a7 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -993,7 +993,7 @@ nfs_pageio_cleanup_request(struct nfs_pageio_descriptor *desc,
LIST_HEAD(head);
nfs_list_move_request(req, &head);
- desc->pg_completion_ops->error_cleanup(&head);
+ desc->pg_completion_ops->error_cleanup(&head, desc->pg_error);
}
/**
@@ -1129,7 +1129,8 @@ static void nfs_pageio_error_cleanup(struct nfs_pageio_descriptor *desc)
for (midx = 0; midx < desc->pg_mirror_count; midx++) {
mirror = &desc->pg_mirrors[midx];
- desc->pg_completion_ops->error_cleanup(&mirror->pg_list);
+ desc->pg_completion_ops->error_cleanup(&mirror->pg_list,
+ desc->pg_error);
}
}