]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: assert straydn to silence coverity error 15818/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 21 Jun 2017 21:10:33 +0000 (14:10 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 22 Jun 2017 22:54:58 +0000 (15:54 -0700)
commit2cb2a0bb92e8a0b5068fb07f3aaeea06ed89a693
tree74af402b3fc18a976a629edc773347f78342e0b7
parentb85e572109907e308e70cf53de01e1f864835606
mds: assert straydn to silence coverity error

The error:

    ** CID 1412578:  Null pointer dereferences  (FORWARD_NULL)
    /home/brad/working/src/ceph/src/mds/Server.cc: 7032 in Server::_rename_prepare(boost::intrusive_ptr<MDRequestImpl> &, EMetaBlob *, ceph::buffer::list *, CDentry *, CDentry *, CDentry *)()

    ________________________________________________________________________________________________________
    *** CID 1412578:  Null pointer dereferences  (FORWARD_NULL)
    /home/brad/working/src/ceph/src/mds/Server.cc: 7032 in Server::_rename_prepare(boost::intrusive_ptr<MDRequestImpl> &, EMetaBlob *, ceph::buffer::list *, CDentry *, CDentry *, CDentry *)()
    7026           force_journal_dest = true;
    7027         } else
    7028           force_journal_dest = _need_force_journal(srci, false);
    7029       }
    7030
    7031       bool force_journal_stray = false;
    >>>     CID 1412578:  Null pointer dereferences  (FORWARD_NULL)
    >>>     Comparing "straydn" to null implies that "straydn" might be null.
    7032       if (oldin && oldin->is_dir() && straydn && !straydn->is_auth())
    7033         force_journal_stray = _need_force_journal(oldin, true);
    7034
    7035       if (linkmerge)
    7036         dout(10) << " merging remote and primary links to the same inode" << dendl;
    7037       if (silent)

Fixes: http://tracker.ceph.com/issues/20254
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Server.cc