From 9af3b86b25574e4d2cdfd43e61028cffa19bdeb1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Jun 2013 11:50:11 -0700 Subject: client: fix remaining Inode::put() caller, and make method psuedo-private Not sure I can make this actually private and make Client::put_inode() a friend method (making all of Client a friend would defeat the purpose). This works well enough, though! Signed-off-by: Sage Weil --- src/client/Inode.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/Inode.h') diff --git a/src/client/Inode.h b/src/client/Inode.h index b33c38eb6f0..af4830b5c77 100644 --- a/src/client/Inode.h +++ b/src/client/Inode.h @@ -181,13 +181,15 @@ class Inode { lsubdout(cct, mds, 15) << "inode.get on " << this << " " << ino << '.' << snapid << " now " << _ref << dendl; } - int put(int n=1) { + /// private method to put a reference; see Client::put_inode() + int _put(int n=1) { _ref -= n; lsubdout(cct, mds, 15) << "inode.put on " << this << " " << ino << '.' << snapid << " now " << _ref << dendl; assert(_ref >= 0); return _ref; } + int get_num_ref() { return _ref; } -- cgit v1.2.3