]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Remove redundant null pointer check 19750/head
authorBrad Hubbard <bhubbard@redhat.com>
Wed, 3 Jan 2018 03:06:26 +0000 (13:06 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Wed, 3 Jan 2018 03:06:26 +0000 (13:06 +1000)
Resolves Coverity CID 1426746

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/mds/MDBalancer.cc

index 14b930c8a6e9bf43636d91a54515fe9c6d7c8c60..4801f8f5abf01bfbac1ee70f6cb533e7c1465b7f 100644 (file)
@@ -1269,11 +1269,9 @@ int MDBalancer::dump_loads(Formatter *f)
     CDir *dir = dfs.front();
     dfs.pop_front();
 
-    if (f) {
-      f->open_object_section("dir");
-      dir->dump_load(f, now, decayrate);
-      f->close_section();
-    }
+    f->open_object_section("dir");
+    dir->dump_load(f, now, decayrate);
+    f->close_section();
 
     for (CDir::map_t::iterator it = dir->begin(); it != dir->end(); ++it) {
       CInode *in = it->second->get_linkage()->get_inode();