All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] xprtrdma: Fix error return code in rpcrdma_buffer_create()
@ 2019-01-16 10:38 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2019-01-16 10:38 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker, J. Bruce Fields, Jeff Layton,
	Chuck Lever
  Cc: Wei Yongjun, linux-nfs, netdev, kernel-janitors

Fix to return a negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 6d2d0ee27c7a ("xprtrdma: Replace rpcrdma_receive_wq with a per-xprt workqueue")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/sunrpc/xprtrdma/verbs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 7749a2b..3dde058 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -1113,8 +1113,10 @@ struct rpcrdma_req *
 						WQ_MEM_RECLAIM | WQ_HIGHPRI,
 						0,
 			r_xprt->rx_xprt.address_strings[RPC_DISPLAY_ADDR]);
-	if (!buf->rb_completion_wq)
+	if (!buf->rb_completion_wq) {
+		rc = -ENOMEM;
 		goto out;
+	}
 
 	return 0;
 out:




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-16 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 10:38 [PATCH net-next] xprtrdma: Fix error return code in rpcrdma_buffer_create() Wei Yongjun
2019-01-16 10:38 ` Wei Yongjun
2019-01-16 15:18 ` Chuck Lever
2019-01-16 15:18   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.