From da31b6520c4456e591b5bc2ea17d95da8488f2b9 Mon Sep 17 00:00:00 2001 From: zoulasc Date: Thu, 3 Mar 2016 13:30:29 -0500 Subject: [PATCH] The nfs_quick_reply() functionality relies on taking a copy of the current transport for later use. The problem with this is the context of the RPC message is kept in the transport and if any RPC message arrives before nfs_quick_reply() is called that context will be corrupted. So add a function get_nfs_xprt() to replace the current transport with a new one returning the passed in transort so nfs_quick_reply() can use it later. A function put_nfs_xprt() is also added (although not really needed since it just destroys the now unused transport) for completeness. From: Ian Kent --- conf/transp/transp_sockets.c | 2 +- conf/transp/transp_tli.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/transp/transp_sockets.c b/conf/transp/transp_sockets.c index 98f79c8d..42502cc9 100644 --- a/conf/transp/transp_sockets.c +++ b/conf/transp/transp_sockets.c @@ -299,7 +299,7 @@ get_nfs_xprt(SVCXPRT *nfs_xprt) xprt_unregister(nfs_xprt); newxprt = svcudp_create(newfd); if (!newxprt) { - plog(XLOG_FATAL, "Can't swicth to new transpot"); + plog(XLOG_FATAL, "Can't switch to new transport"); xprt_register(nfs_xprt); close(newfd); return NULL; diff --git a/conf/transp/transp_tli.c b/conf/transp/transp_tli.c index ea565cce..1c47fd95 100644 --- a/conf/transp/transp_tli.c +++ b/conf/transp/transp_tli.c @@ -482,7 +482,7 @@ get_nfs_xprt(SVCXPRT *nfs_xprt) xprt_unregister(nfs_xprt); newxprt = svc_tli_create(newfd, nfsncp, NULL, 0, 0); if (!newxprt) { - plog(XLOG_FATAL, "Can't swicth to new transpot"); + plog(XLOG_FATAL, "Can't switch to new transport"); xprt_register(nfs_xprt); close(newfd); return NULL; -- 2.43.0