From: Yan, Zheng Date: Wed, 5 Apr 2017 13:29:10 +0000 (+0800) Subject: mds: make C_MDSInternalNoop::complete() delete 'this' X-Git-Tag: v10.2.8~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7347f1193963666ce07ff9163064aeb0cf343d38;p=ceph.git mds: make C_MDSInternalNoop::complete() delete 'this' Fixes: http://tracker.ceph.com/issues/19501 Signed-off-by: "Yan, Zheng" (cherry picked from commit 424e0c6744e7f63459ca0ff7deab751726aa30cd) Conflicts: src/mds/MDSContext.h (omit "override" because jewel does not have 1a91aeab987870b3ccbcf2f1e476fac8b534d449) --- diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h index d26d1bdb783a..d86b732ff92f 100644 --- a/src/mds/MDSContext.h +++ b/src/mds/MDSContext.h @@ -114,12 +114,12 @@ public: /** * No-op for callers expecting MDSInternalContextBase */ -class C_MDSInternalNoop : public MDSInternalContextBase +class C_MDSInternalNoop final : public MDSInternalContextBase { virtual MDSRank* get_mds() {assert(0);} public: void finish(int r) {} - void complete(int r) {} + void complete(int r) { delete this; } };