mirror of
https://github.com/ceph/ceph
synced 2024-12-14 23:46:28 +00:00
uclient: don't unlink null dentry when getting null linkage in mds reply
This broke semi-recently when the mds started returning null linkages (and associated leases).
This commit is contained in:
parent
bf1cb87d25
commit
f7708dea1f
@ -645,7 +645,8 @@ Inode* Client::insert_trace(MetaRequest *request, utime_t from, int mds)
|
||||
Dentry *dn = NULL;
|
||||
if (diri->dir && diri->dir->dentries.count(dname)) {
|
||||
dn = diri->dir->dentries[dname];
|
||||
unlink(dn, false);
|
||||
if (dn->inode)
|
||||
unlink(dn, false);
|
||||
}
|
||||
}
|
||||
} else if (reply->head.op == CEPH_MDS_OP_LOOKUPSNAP ||
|
||||
@ -669,7 +670,8 @@ Inode* Client::insert_trace(MetaRequest *request, utime_t from, int mds)
|
||||
Dentry *dn = NULL;
|
||||
if (diri->dir && diri->dir->dentries.count(dname)) {
|
||||
dn = diri->dir->dentries[dname];
|
||||
unlink(dn, false);
|
||||
if (dn->inode)
|
||||
unlink(dn, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user