Cleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalent to put

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
This commit is contained in:
Sebastien Ponce 2014-10-15 15:50:35 +02:00
parent dbe11d1e9b
commit 5299db341b
3 changed files with 3 additions and 10 deletions

View File

@ -25,7 +25,6 @@ struct libradosstriper::MultiAioCompletionImpl {
Mutex lock;
Cond cond;
int ref, rval;
bool released;
int pending_complete, pending_safe;
rados_callback_t callback_complete, callback_safe;
void *callback_complete_arg, *callback_safe_arg;
@ -34,7 +33,7 @@ struct libradosstriper::MultiAioCompletionImpl {
std::list<bufferlist*> bllist; /// keep temporary buffer lists used for destriping
MultiAioCompletionImpl() : lock("MultiAioCompletionImpl lock", false, false),
ref(1), rval(0), released(false),
ref(1), rval(0),
pending_complete(0), pending_safe(0),
callback_complete(0), callback_safe(0),
callback_complete_arg(0), callback_safe_arg(0),
@ -120,12 +119,6 @@ struct libradosstriper::MultiAioCompletionImpl {
lock.Unlock();
return r;
}
void release() {
lock.Lock();
assert(!released);
released = true;
put_unlock();
}
void get() {
lock.Lock();
_get();

View File

@ -669,7 +669,7 @@ int libradosstriper::RadosStriperImpl::write_in_open_object(const std::string& s
rc = c->get_return_value();
}
delete cdata;
c->release();
c->put();
return rc;
}

View File

@ -108,7 +108,7 @@ int libradosstriper::MultiAioCompletion::get_return_value()
void libradosstriper::MultiAioCompletion::release()
{
MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
c->release();
c->put();
delete this;
}