diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2021-08-06 23:09:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-06 23:09:44 +0200 |
commit | 1cb16e2fdab9b85009ec9f3498747c99495244b5 (patch) | |
tree | bfd528417870b40dca40582e4f32fbfbf381ce37 /src | |
parent | Merge pull request #42705 from tchaikov/wip-clang-fixes (diff) | |
parent | librbd/cache/pwl: avoid stack overflow caused by nested shared_ptr destruction (diff) | |
download | ceph-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.cc | 5 |
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() { |