diff options
author | Anand Avati <avati@gluster.com> | 2011-03-01 14:40:27 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-03-01 13:23:13 -0800 |
commit | f8ac2f645716847929f89ed218487f67db3e9f01 (patch) | |
tree | 0d5a4918613df873ed460cfac7121b668842181e | |
parent | 7e546e16925e50dc33db05c67b8b5cad1b3922ef (diff) |
rpcsvc: perform mem_put at the very end for safe unrefs
Signed-off-by: Anand Avati <avati@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2481 (Crash in NFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2481
-rw-r--r-- | xlators/nfs/lib/src/rpcsvc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c index f75fe4ccf..cd9733ecb 100644 --- a/xlators/nfs/lib/src/rpcsvc.c +++ b/xlators/nfs/lib/src/rpcsvc.c @@ -1687,7 +1687,6 @@ nfs_rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec msgvec, if (msg) iobuf_ref (msg); ret = nfs_rpcsvc_conn_submit (conn, recordhdr, replyiob, msgvec, msg); - mem_put (conn->rxpool, req); if (ret == -1) { gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to submit message"); @@ -1710,6 +1709,8 @@ disconnect_exit: (nfs_rpcsvc_request_accepted_success (req))) nfs_rpcsvc_conn_unref (conn); + mem_put (conn->rxpool, req); + return ret; } |