]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: Ensure inode/dentries are ref counted
authorSam Lang <sam.lang@inktank.com>
Tue, 26 Feb 2013 00:51:19 +0000 (18:51 -0600)
committerSam Lang <sam.lang@inktank.com>
Sat, 16 Mar 2013 16:45:36 +0000 (11:45 -0500)
commitfc80c1dc6ee315ae5e039986602ffadba46cb43b
tree77e0cc58ee3cc3555c98d56fcf7cf422de7b9ff7
parentf8d66e87a5c155b027cc6249006b83b4ac9b6c9b
client: Ensure inode/dentries are ref counted

The MetaRequest holds onto inodes and dentries
for retrying unsafe requests, but those objects
might be removed from the cache (unlink for example)
causing the inode/dentry to be freed.  Ensure that
the inode/dentry is never freed while the MetaRequest
holds onto it by putting/getting the refs using
set/get interfaces.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/client/Client.cc
src/client/MetaRequest.cc
src/client/MetaRequest.h