]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix dentry ref counting
authorSage Weil <sage@newdream.net>
Wed, 29 Jun 2011 21:54:28 +0000 (14:54 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 30 Jun 2011 03:17:04 +0000 (20:17 -0700)
commit3ef86711e86eeee8b872c128509f893477e8d053
tree21bc34a25e020e4f5ecba929d71e66d518fb4b7a
parent310032ee8128f6417ac302c0f5ecd27c691cbcc7
client: fix dentry ref counting

Before nobody ever pinned dentries except Dirs.  The only valid ref
counts were 0 and 1, and unlink, rename, etc would delete the unlinked
dentry.

Now, ref can by anything > 0.  > 1 means it is also pinned in the LRU.
Unlink/rename ->put() and the last put() deletes (via private destructor).

Signed-off-by: Sage Weil <sage@newdream.net>
src/client/Client.h