From bddab3ef21f209d2ddb42c153cc168a6b355cd66 Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Mon, 9 Nov 2015 23:05:01 +0800 Subject: [PATCH] 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 --- src/librbd/ImageCtx.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index c42c6fd57ef..cb3f069fee9 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(); -- 2.47.3