]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: assert(in) on _flush
authorSage Weil <sage@newdream.net>
Thu, 19 May 2011 22:00:34 +0000 (15:00 -0700)
committerSage Weil <sage@newdream.net>
Thu, 19 May 2011 22:04:31 +0000 (15:04 -0700)
We should never arrive in _flush() and not have a reference to the inode
in question, because the presence of dirty buffers pins the inode.  This
condition was introduced forever ago; clean it out.

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

index 01df97097d974b58e5308daa7d4ee5f658f9d133..11cd998e1a6d4e277540f7aa417c5d4da2ed8bd7 100644 (file)
@@ -1726,8 +1726,6 @@ void Client::put_inode(Inode *in, int n)
  * caps
  */
 
-
-
 void Inode::get_cap_ref(int cap)
 {
   int n = 0;
@@ -2211,8 +2209,8 @@ void Client::flush_set_callback(ObjectCacher::ObjectSet *oset)
   //  Mutex::Locker l(client_lock);
   assert(client_lock.is_locked());   // will be called via dispatch() -> objecter -> ...
   Inode *in = (Inode *)oset->parent;
-  if (in)
-    _flushed(in);
+  assert(in);
+  _flushed(in);
 }
 
 void Client::_flushed(Inode *in)