mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
Merge remote-tracking branch 'upstream/pull/15818/head' into master
* upstream/pull/15818/head: mds: assert straydn to silence coverity error Reviewed-by: Zheng Yan <zyan@redhat.com>
This commit is contained in:
commit
b72ac6e857
@ -7170,9 +7170,11 @@ void Server::_rename_prepare(MDRequestRef& mdr,
|
||||
if (destdn->is_auth() && !destdnl->is_null()) {
|
||||
mdcache->predirty_journal_parents(mdr, metablob, oldin, destdn->get_dir(),
|
||||
(destdnl->is_primary() ? PREDIRTY_PRIMARY:0)|predirty_dir, -1);
|
||||
if (destdnl->is_primary())
|
||||
if (destdnl->is_primary()) {
|
||||
assert(straydn);
|
||||
mdcache->predirty_journal_parents(mdr, metablob, oldin, straydn->get_dir(),
|
||||
PREDIRTY_PRIMARY|PREDIRTY_DIR, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// move srcdn
|
||||
@ -7191,6 +7193,7 @@ void Server::_rename_prepare(MDRequestRef& mdr,
|
||||
// target inode
|
||||
if (!linkmerge) {
|
||||
if (destdnl->is_primary()) {
|
||||
assert(straydn);
|
||||
if (destdn->is_auth()) {
|
||||
// project snaprealm, too
|
||||
if (oldin->snaprealm || dest_realm->get_newest_seq() + 1 > oldin->get_oldest_snap())
|
||||
@ -7284,8 +7287,10 @@ void Server::_rename_prepare(MDRequestRef& mdr,
|
||||
if (srcdnl->is_primary() && destdn->is_auth())
|
||||
srci->first = destdn->first;
|
||||
|
||||
if (oldin && oldin->is_dir())
|
||||
if (oldin && oldin->is_dir()) {
|
||||
assert(straydn);
|
||||
mdcache->project_subtree_rename(oldin, destdn->get_dir(), straydn->get_dir());
|
||||
}
|
||||
if (srci->is_dir())
|
||||
mdcache->project_subtree_rename(srci, srcdn->get_dir(), destdn->get_dir());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user