From: Haomai Wang Date: Mon, 9 Nov 2015 15:05:01 +0000 (+0800) Subject: librbd: Remove unneeded set_event_notify X-Git-Tag: v10.0.2~142^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bddab3ef21f209d2ddb42c153cc168a6b355cd66;p=ceph.git librbd: Remove unneeded set_event_notify 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 --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index c42c6fd57ef5..cb3f069fee9c 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -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::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 &configs, map &pairs, map *res) { size_t conf_prefix_len = prefix.size();