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
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-06 10:22:23 +0200
commitb5891b624b9a5d3dd65b6c5a6601480bcb1a3dc3 (patch)
tree414e3fc825c4b1c989da32f2e803e550613341fe /fs/nfs/pagelist.c
parent812de6dee596e10d46ce3d7dc4736fa288218117 (diff)
downloadlinux-stable-b5891b624b9a5d3dd65b6c5a6601480bcb1a3dc3.tar.gz
linux-stable-b5891b624b9a5d3dd65b6c5a6601480bcb1a3dc3.tar.bz2
linux-stable-b5891b624b9a5d3dd65b6c5a6601480bcb1a3dc3.zip
NFS: Pass error information to the pgio error cleanup routine
[ Upstream commit df3accb849607a86278a37c35e6b313635ccc48b ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
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 9cbd829b4ed5..7f0b9409202c 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -994,7 +994,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);
}
/**
@@ -1130,7 +1130,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);
}
}