librbd/cache/pwl: arm periodic stats timer only after init succeeds
If an init step fails after pwl_init() armed the stats timer, InitRequest deletes the image cache without shut_down(), so the self-rearming timer callback keeps firing on the freed object. Arm the timer after write_image_cache_state() completes instead: on failure paths it is never armed, and any later teardown goes through shut_down(), which cancels it. Fixes: https://tracker.ceph.com/issues/79548 Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
S
Sun Yuechi committed
21149c1c7b0fcf4bafcaf14a0ecde38747cda597
Parent: a0c37e5