diff mbox series

[1/2] nfs: remove redundant call to nfs_context_set_write_error()

Message ID da793f7920f4d263d4a4f47f7f524f3c1eaf59b4.1539792123.git.bcodding@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/2] nfs: remove redundant call to nfs_context_set_write_error() | expand

Commit Message

Benjamin Coddington Oct. 17, 2018, 4:05 p.m. UTC
We don't need to call this in the direct, read, or pnfs resend paths and
the only other caller is the write path in nfs_page_async_flush() which
already checks and sets the pg_error on the context.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/nfs/pagelist.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 67d19cd92e44..cd3bc41ab68d 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -1168,11 +1168,6 @@  int nfs_pageio_add_request(struct nfs_pageio_descriptor *desc,
 		struct nfs_pgio_mirror *mirror;
 		void (*func)(struct list_head *);
 
-		/* remember fatal errors */
-		if (nfs_error_is_fatal(desc->pg_error))
-			nfs_context_set_write_error(req->wb_context,
-						    desc->pg_error);
-
 		func = desc->pg_completion_ops->error_cleanup;
 		for (midx = 0; midx < desc->pg_mirror_count; midx++) {
 			mirror = &desc->pg_mirrors[midx];