[PATCH 5.4 296/388] ceph: fix potential race in ceph_check_caps