[PATCH 6.1 157/197] ceph: prevent use-after-free in encode_cap_msg()