]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: do not gratuitously drop FILE_CACHE ref in _read()
authorSage Weil <sage@inktank.com>
Fri, 9 Nov 2012 14:48:10 +0000 (06:48 -0800)
committerSage Weil <sage@inktank.com>
Fri, 9 Nov 2012 15:38:42 +0000 (07:38 -0800)
commitad4bd4e23e1c3e1d8156e57c83c26e66d475cdd7
treeb5cab36127729583d6120843ef223523ad019d55
parent128fed8e17e6449400b2e7deaa2cf6018b079ea2
client: do not gratuitously drop FILE_CACHE ref in _read()

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>
src/client/Client.cc