summaryrefslogtreecommitdiffstats
path: root/src/client/Inode.h
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-28 20:50:11 +0200
committerSage Weil <sage@inktank.com>2013-06-28 20:50:11 +0200
commit9af3b86b25574e4d2cdfd43e61028cffa19bdeb1 (patch)
treeb3f45e18dd676db8dd59b24843891987a9ab0bf5 /src/client/Inode.h
parentclient: use put_inode on MetaRequest inode refs (diff)
downloadceph-9af3b86b25574e4d2cdfd43e61028cffa19bdeb1.tar.xz
ceph-9af3b86b25574e4d2cdfd43e61028cffa19bdeb1.zip
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 <sage@inktank.com>
Diffstat (limited to 'src/client/Inode.h')
-rw-r--r--src/client/Inode.h4
1 files changed, 3 insertions, 1 deletions
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;
}