]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore::stat: valgrind: don't read *st on error
authorSamuel Just <sam.just@inktank.com>
Wed, 20 Mar 2013 18:06:59 +0000 (11:06 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 22 Mar 2013 01:37:35 +0000 (18:37 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/FileStore.cc

index 7888c9fa39518655a49dce59b1d439dc4750e510..5d3fd2e8e3ca31955ae675e7b6d1efd16a17a037 100644 (file)
@@ -2715,7 +2715,14 @@ bool FileStore::exists(coll_t cid, const hobject_t& oid)
 int FileStore::stat(coll_t cid, const hobject_t& oid, struct stat *st)
 {
   int r = lfn_stat(cid, oid, st);
-  dout(10) << "stat " << cid << "/" << oid << " = " << r << " (size " << st->st_size << ")" << dendl;
+  if (r < 0) {
+    dout(10) << "stat " << cid << "/" << oid
+            << " = " << r << dendl;
+  } else {
+    dout(10) << "stat " << cid << "/" << oid
+            << " = " << r
+            << " (size " << st->st_size << ")" << dendl;
+  }
   return r;
 }