]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: drop async pool create completion reference
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 30 Sep 2013 22:44:25 +0000 (15:44 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 30 Sep 2013 22:44:25 +0000 (15:44 -0700)
Fixes: #6444
Backport: dumpling
If pool creation fails (e.g., due to -EEXIST) then we leak the
completion object. Earlier we couldn't just drop the reference, as
librados have already removed the internal completion object. This fix
drop the completion reference even if got an error, which is now
possible.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index 1b97f28e2fa035dcd784db3989c229f5f82f576f..cf679c50313bc574d3892bbb773faabcd39ca3ca 100644 (file)
@@ -2182,8 +2182,8 @@ int RGWRados::create_pools(vector<string>& names, vector<int>& retcodes)
       if (r < 0) {
         ldout(cct, 0) << "WARNING: async pool_create returned " << r << dendl;
       }
-      c->release();
     }
+    c->release();
     retcodes.push_back(r);
   }
   return 0;