summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2021-08-06 23:09:44 +0200
committerGitHub <noreply@github.com>2021-08-06 23:09:44 +0200
commit1cb16e2fdab9b85009ec9f3498747c99495244b5 (patch)
treebfd528417870b40dca40582e4f32fbfbf381ce37 /src
parentMerge pull request #42705 from tchaikov/wip-clang-fixes (diff)
parentlibrbd/cache/pwl: avoid stack overflow caused by nested shared_ptr destruction (diff)
downloadceph-1cb16e2fdab9b85009ec9f3498747c99495244b5.tar.xz
ceph-1cb16e2fdab9b85009ec9f3498747c99495244b5.zip
Merge pull request #42149 from hualongfeng/fix_sync_point
librbd/cache/pwl: avoid stack overflow caused by nested shared_ptr destruction Reviewed-by: Jianpeng Ma <jianpeng.ma@intel.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/librbd/cache/pwl/LogOperation.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librbd/cache/pwl/LogOperation.cc b/src/librbd/cache/pwl/LogOperation.cc
index 701fe14b1a6..2c5a5ef78d6 100644
--- a/src/librbd/cache/pwl/LogOperation.cc
+++ b/src/librbd/cache/pwl/LogOperation.cc
@@ -70,9 +70,10 @@ std::vector<Context*> SyncPointLogOperation::append_sync_point() {
void SyncPointLogOperation::clear_earlier_sync_point() {
std::lock_guard locker(m_lock);
ceph_assert(sync_point->later_sync_point);
- ceph_assert(sync_point->later_sync_point->earlier_sync_point ==
- sync_point);
+ ceph_assert(sync_point->later_sync_point->earlier_sync_point == sync_point);
sync_point->later_sync_point->earlier_sync_point = nullptr;
+ sync_point->later_sync_point = nullptr;
+ sync_point->log_entry->next_sync_point_entry = nullptr;
}
std::vector<Context*> SyncPointLogOperation::swap_on_sync_point_persisted() {