mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
mds: check projected parent to avoid unsafe access
An anonymous inode may not have a stable parent so immediate migration would cause a segfault when checking for strays. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
parent
b2f53b85c3
commit
26a08f31f7
@ -781,7 +781,7 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dir->inode->is_base() && dir->get_parent_dir()->get_inode()->is_stray() &&
|
||||
if (!dir->inode->is_base() && dir->get_inode()->get_projected_parent_dir()->get_inode()->is_stray() &&
|
||||
dir->get_parent_dir()->get_parent_dir()->ino() != MDS_INO_MDSDIR(dest)) {
|
||||
dout(7) << "i won't export anything in stray" << dendl;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user