]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: hold reference for newly updated snaprealm
authorYan, Zheng <zyan@redhat.com>
Wed, 22 Feb 2017 07:38:06 +0000 (15:38 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 22 Feb 2017 09:39:24 +0000 (17:39 +0800)
commit2be8903b41d401e152c7f6e0392fec7c3f4286b2
tree490815a949749012eb3aa940dde7901715f8fe84
parent41253bbd6cd7243957bf17afb3ddb44edb0087c3
client: hold reference for newly updated snaprealm

Client::update_snap_trace() may create new snaprealm, then update
them. When Client::update_snap_trace() return, the newly created
snaprealm get freed immediately. This is wrong because callers of
Client::update_snap_trace() expects Client::get_snap_realm() return
the updated snaprealm.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/Client.cc
src/client/Client.h