From 2362d1c90084a3cb3252052bdfea746b1d45c936 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Thu, 19 Jul 2012 14:19:28 -0700 Subject: [PATCH] refresh (create temporary patch) --- meta | 5 ++-- patches/refresh-temp | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 patches/refresh-temp diff --git a/meta b/meta index 6ff8c6a8..e106070e 100644 --- a/meta +++ b/meta @@ -1,9 +1,10 @@ Version: 1 -Previous: 4c713c380c7f1c91e2866e431489502a0d514de2 -Head: 05f424a751356396f7546c73b8d2881109958008 +Previous: 219d8c12669b4d4f34b8e62f57df2909a91f922e +Head: 30ca433ea9422e4ed89726b35029369dda64dbc3 Applied: rm-ib-var: 63a728f303f78348ad9727c46ac3e271197dace4 cma-rm-pd: 05f424a751356396f7546c73b8d2881109958008 + refresh-temp: 30ca433ea9422e4ed89726b35029369dda64dbc3 Unapplied: transpose: 84e0beee0d2d3c217cd9703b9e438d25856cacb6 fork: 0744fbe2b19f7924faf0dce72349307cc445577e diff --git a/patches/refresh-temp b/patches/refresh-temp new file mode 100644 index 00000000..ceb5d964 --- /dev/null +++ b/patches/refresh-temp @@ -0,0 +1,60 @@ +Bottom: 8be788d836cc93c7da4ef5d9221d97c9784be146 +Top: 31c0cf47f562afc290796ba3e9791f672a7d5d8b +Author: Sean Hefty +Date: 2012-07-19 14:19:28 -0700 + +Refresh of cma-rm-pd + +--- + +diff --git a/src/cma.c b/src/cma.c +index a190dee..e2772fa 100755 +--- a/src/cma.c ++++ b/src/cma.c +@@ -131,7 +131,6 @@ static int verbs_refcnt; + static void ucma_cleanup(void) + { + ucma_ib_cleanup(); +- ucma_release_verbs(); + + if (cma_dev_cnt) { + while (cma_dev_cnt--) { +@@ -349,7 +348,7 @@ void rdma_destroy_event_channel(struct rdma_event_channel *channel) + static int ucma_get_device(struct cma_id_private *id_priv, uint64_t guid) + { + struct cma_device *cma_dev; +- int i; ++ int i, ret = 0; + + for (i = 0; i < cma_dev_cnt; i++) { + cma_dev = &cma_dev_array[i]; +@@ -364,15 +363,16 @@ match: + cma_dev->pd = ibv_alloc_pd(cma_dev_array[i].verbs); + if (!cma_dev->pd) { + cma_dev->refcnt--; +- pthread_mutex_unlock(&mut); +- return ERR(ENOMEM); ++ ret = ERR(ENOMEM); ++ goto out; + } + } +- pthread_mutex_unlock(&mut); + id_priv->cma_dev = cma_dev; + id_priv->id.verbs = cma_dev->verbs; + id_priv->id.pd = cma_dev->pd; +- return 0; ++out: ++ pthread_mutex_unlock(&mut); ++ return ret; + } + + static void ucma_put_device(struct cma_device *cma_dev) +@@ -385,6 +385,8 @@ static void ucma_put_device(struct cma_device *cma_dev) + + static void ucma_free_id(struct cma_id_private *id_priv) + { ++ if (id_priv->cma_dev) ++ ucma_put_device(id_priv->cma_dev); + pthread_cond_destroy(&id_priv->cond); + pthread_mutex_destroy(&id_priv->mut); + if (id_priv->id.route.path_rec) -- 2.41.0