The get_caps() had a confusing out-arg called "got" that is really what
caps we *have*; it only takes a ref on the *need* cap. We should only
put that one explicitly (CEPH_CAP_FILE_RD). The _write() method already
does this properly, but _read() did not.
Fixes: #3470
Signed-off-by: Sage Weil <sage@inktank.com>
f->last_pos = offset+bl->length();
// done!
- put_cap_ref(in, got);
+ put_cap_ref(in, CEPH_CAP_FILE_RD);
return r;
}