ceph: fix NULL pointer dereference in ceph_flush_snaps()