]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: Remove unneeded set_event_notify
authorHaomai Wang <haomai@xsky.com>
Mon, 9 Nov 2015 15:05:01 +0000 (23:05 +0800)
committerHaomai Wang <haomai@xsky.com>
Tue, 1 Dec 2015 02:03:48 +0000 (10:03 +0800)
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>
src/librbd/ImageCtx.cc

index c42c6fd57ef5b60578197f43cbb2e20b48bc7c40..cb3f069fee9c45b508a2c26fe8bafe9e8c7fb237 100644 (file)
@@ -878,16 +878,9 @@ struct C_InvalidateCache : public Context {
     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();