]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix trim_caps() args
authorSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 23:08:42 +0000 (16:08 -0700)
committerSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 23:36:58 +0000 (16:36 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc
src/client/Client.h

index 0317781c07ccec598f071c19b71fdd87053af17a..eed4809647f3a07451f81b25a8046a76188c29be 100644 (file)
@@ -1555,7 +1555,7 @@ void Client::handle_client_session(MClientSession *m)
     break;
 
   case CEPH_SESSION_RECALL_STATE:
-    trim_caps(from, m->get_max_caps());
+    trim_caps(session, m->get_max_caps());
     break;
 
   default:
@@ -2875,10 +2875,10 @@ void Client::remove_session_caps(MetaSession *mds)
   }
 }
 
-void Client::trim_caps(int mds, int max)
+void Client::trim_caps(MetaSession *s, int max)
 {
+  int mds = s->mds_num;
   ldout(cct, 10) << "trim_caps mds." << mds << " max " << max << dendl;
-  MetaSession *s = mds_sessions[mds];
 
   int trimmed = 0;
   xlist<Cap*>::iterator p = s->caps.begin();
index 33419a266cddc6e43be0bdb25375ad238f85096e..af03bfb0090f3cccbc3b9974c61d1a4e2eb72db9 100644 (file)
@@ -371,7 +371,7 @@ protected:
   // trim cache.
   void trim_cache();
   void trim_dentry(Dentry *dn);
-  void trim_caps(int mds, int max);
+  void trim_caps(MetaSession *s, int max);
   
   void dump_inode(Formatter *f, Inode *in, set<Inode*>& did, bool disconnected);
   void dump_cache(Formatter *f);  // debug