Skip to content

Commit

Permalink
librbd: Remove unneeded set_event_notify
Browse files Browse the repository at this point in the history
Since xlist clear method invoked below is enough to disassociate the xlist
item from the xlist, so the remove_myself() call in the destructor is safe
to invoke since it's already been removed from the list.

Signed-off-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Nov 12, 2015
1 parent d3c4835 commit 3d83a69
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/librbd/ImageCtx.cc
Expand Up @@ -816,16 +816,9 @@ class ThreadPoolSingleton : public ThreadPool {
Mutex::Locker l(completed_reqs_lock);
ldout(cct, 10) << "clear pending AioCompletion: count="
<< completed_reqs.size() << dendl;

for (xlist<AioCompletion*>::iterator it = completed_reqs.begin();
!it.end(); ++it) {
ldout(cct, 10) << "clear pending AioCompletion: " << *it << dendl;
(*it)->set_event_notify(false);
}
completed_reqs.clear();
}


bool ImageCtx::_filter_metadata_confs(const string &prefix, map<string, bool> &configs,
map<string, bufferlist> &pairs, map<string, bufferlist> *res) {
size_t conf_prefix_len = prefix.size();
Expand Down

0 comments on commit 3d83a69

Please sign in to comment.