mirror of
https://github.com/ceph/ceph
synced 2024-12-22 03:22:00 +00:00
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:
parent
dbe11d1e9b
commit
5299db341b
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ int libradosstriper::MultiAioCompletion::get_return_value()
|
||||
void libradosstriper::MultiAioCompletion::release()
|
||||
{
|
||||
MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
|
||||
c->release();
|
||||
c->put();
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user