mirror of
https://github.com/ceph/ceph
synced 2025-01-31 07:22:56 +00:00
librbd: check event_notify to avoid extra logic
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
parent
c7703db989
commit
ca32fc5a8e
@ -132,9 +132,11 @@ namespace librbd {
|
||||
int n = --ref;
|
||||
lock.Unlock();
|
||||
if (!n) {
|
||||
ictx->completed_reqs_lock.Lock();
|
||||
m_xlist_item.remove_myself();
|
||||
ictx->completed_reqs_lock.Unlock();
|
||||
if (event_notify) {
|
||||
ictx->completed_reqs_lock.Lock();
|
||||
m_xlist_item.remove_myself();
|
||||
ictx->completed_reqs_lock.Unlock();
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user