14e44be7b0
Resolves: bz#1234220 bz#1286171 bz#1487177 bz#1524457 bz#1640573 Resolves: bz#1663557 bz#1667954 bz#1683602 bz#1686897 bz#1721355 Resolves: bz#1748865 bz#1750211 bz#1754391 bz#1759875 bz#1761531 Resolves: bz#1761932 bz#1763124 bz#1763129 bz#1764091 bz#1775637 Resolves: bz#1776901 bz#1781550 bz#1781649 bz#1781710 bz#1783232 Resolves: bz#1784211 bz#1784415 bz#1786516 bz#1786681 bz#1787294 Resolves: bz#1787310 bz#1787331 bz#1787994 bz#1790336 bz#1792873 Resolves: bz#1794663 bz#1796814 bz#1804164 bz#1810924 bz#1815434 Resolves: bz#1836099 bz#1837467 bz#1837926 bz#1838479 bz#1839137 Resolves: bz#1844359 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
53 lines
2.0 KiB
Diff
53 lines
2.0 KiB
Diff
From 73cef29731c0d7b8b4f3b880c032dc232b8fcc31 Mon Sep 17 00:00:00 2001
|
|
From: Mohit Agrawal <moagrawa@redhat.com>
|
|
Date: Thu, 4 Jun 2020 16:06:44 +0530
|
|
Subject: [PATCH 397/449] mgmt/brick-mux: Avoid sending two response when
|
|
attach is failed.
|
|
|
|
We were sending two response back to glusterd when an attach is
|
|
failed. One from the handler function glusterfs_handle_attach and
|
|
another from rpcsvc_check_and_reply_error. It was causing problems
|
|
like ref leaks, transport disconnect etc.
|
|
|
|
> Change-Id: I3bb5b59959530760b568d52becb519499b3dcd2b
|
|
> updates: bz#1785143
|
|
> Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
> (Cherry pick from commit 42f484dcecd9942611396d9bd2ad3a39019b0e1f)
|
|
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23906/)
|
|
|
|
Change-Id: I3bb5b59959530760b568d52becb519499b3dcd2b
|
|
BUG: 1776901
|
|
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/202346
|
|
Reviewed-by: Sanju Rakonde <srakonde@redhat.com>
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
---
|
|
glusterfsd/src/glusterfsd-mgmt.c | 10 +++++++++-
|
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
|
|
index 15acc10..61d1b21 100644
|
|
--- a/glusterfsd/src/glusterfsd-mgmt.c
|
|
+++ b/glusterfsd/src/glusterfsd-mgmt.c
|
|
@@ -954,7 +954,15 @@ glusterfs_handle_attach(rpcsvc_request_t *req)
|
|
ret = -1;
|
|
}
|
|
|
|
- glusterfs_translator_info_response_send(req, ret, NULL, NULL);
|
|
+ ret = glusterfs_translator_info_response_send(req, ret, NULL, NULL);
|
|
+ if (ret) {
|
|
+ /* Response sent back to glusterd, req is already destroyed. So
|
|
+ * resetting the ret to 0. Otherwise another response will be
|
|
+ * send from rpcsvc_check_and_reply_error. Which will lead to
|
|
+ * double resource leak.
|
|
+ */
|
|
+ ret = 0;
|
|
+ }
|
|
|
|
out:
|
|
UNLOCK(&ctx->volfile_lock);
|
|
--
|
|
1.8.3.1
|
|
|