mirror of
https://github.com/ceph/ceph
synced 2025-01-10 21:20:46 +00:00
mds/Migrator.cc: fix possible NULL pointer dereference
Move dout() calls behind the related asserts to prevent possible NULL pointer dereference. CID 717001 (#1 of 1): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "diri" when calling "operator <<(std::ostream &, CInode Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
5110497e31
commit
de1e355360
@ -378,20 +378,20 @@ void Migrator::handle_mds_failure_or_stop(int who)
|
||||
break;
|
||||
|
||||
case IMPORT_DISCOVERED:
|
||||
dout(10) << "import state=discovered : unpinning inode " << *diri << dendl;
|
||||
assert(diri);
|
||||
dout(10) << "import state=discovered : unpinning inode " << *diri << dendl;
|
||||
import_reverse_discovered(df, diri);
|
||||
break;
|
||||
|
||||
case IMPORT_PREPPING:
|
||||
dout(10) << "import state=prepping : unpinning base+bounds " << *dir << dendl;
|
||||
assert(dir);
|
||||
dout(10) << "import state=prepping : unpinning base+bounds " << *dir << dendl;
|
||||
import_reverse_prepping(dir);
|
||||
break;
|
||||
|
||||
case IMPORT_PREPPED:
|
||||
dout(10) << "import state=prepped : unpinning base+bounds, unfreezing " << *dir << dendl;
|
||||
assert(dir);
|
||||
dout(10) << "import state=prepped : unpinning base+bounds, unfreezing " << *dir << dendl;
|
||||
{
|
||||
set<CDir*> bounds;
|
||||
cache->get_subtree_bounds(dir, bounds);
|
||||
|
Loading…
Reference in New Issue
Block a user