nfs: remove redundant call to nfs_context_set_write_error()
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 18 Oct 2018 19:01:49 +0000 (15:01 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 18 Oct 2018 21:20:57 +0000 (17:20 -0400)
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>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pagelist.c

index 3b50edf6f883300de8426b74a4055b34b16b45a4..5c4568a0804b657a06f63b19185ac0d2d6a702cb 100644 (file)
@@ -1174,10 +1174,6 @@ int nfs_pageio_add_request(struct nfs_pageio_descriptor *desc,
        return 1;
 
 out_failed:
-       /* remember fatal errors */
-       if (nfs_error_is_fatal(desc->pg_error))
-               nfs_context_set_write_error(req->wb_context,
-                                               desc->pg_error);
        nfs_pageio_error_cleanup(desc);
        return 0;
 }