]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix Client::handle_cap_flushsnap_ack() crash 13120/head
authorYan, Zheng <zyan@redhat.com>
Tue, 10 Jan 2017 09:16:40 +0000 (17:16 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 26 Jan 2017 04:16:27 +0000 (05:16 +0100)
commitbc9b7792e4d44c199b526c2d5b17916d948b0354
treef91f39f8c557ff5bba8cf717673f5cd1d7d107c4
parenta632cc41755be4393a12dd768726ade86a49bbc9
client: fix Client::handle_cap_flushsnap_ack() crash

Struct CapSnap holds a reference to its parent inode. So erasing
struct CapSnap from Inode::cap_snaps may drop inode's last reference.
The inode gets freed in the middle of erasing struct CapSnap

Fixes: http://tracker.ceph.com/issues/18460
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 525c52fd491ed1ced385c8047872e3f557f8423f)

Conflicts:
src/client/Client.cc (jewel does in->cap_snaps.erase(follows), master
                             does not; put it after the tmp_ref assignment)
src/client/Client.cc