]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: initialize 'divergent' to false when comparing inode_t 5564/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 13 Aug 2015 06:28:50 +0000 (14:28 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 13 Aug 2015 06:28:50 +0000 (14:28 +0800)
'divergent' is not set in the case when all the fields of 'inode_t' are
equal.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/mds/mdstypes.cc

index 136312ae14fd0d1c113d767bcd14b97bcdd682e0..28843a58a2879a1a3c35b8055549703994f05c2d 100644 (file)
@@ -443,6 +443,7 @@ void inode_t::generate_test_instances(list<inode_t*>& ls)
 int inode_t::compare(const inode_t &other, bool *divergent) const
 {
   assert(ino == other.ino);
+  *divergent = false;
   if (version == other.version) {
     if (rdev != other.rdev ||
         ctime != other.ctime ||