Previously, we were asserting (farther down) if the dentry was
null but blocked by a lock. Instead, we should here be waiting
until it's readable instead of just continuing on.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
}
// can we conclude ENOENT?
- if (dnl && dnl->is_null() && dn->lock.can_read(client)) {
- dout(12) << "traverse: miss on null+readable dentry " << path[depth] << " " << *dn << dendl;
- return -ENOENT;
+ if (dnl && dnl->is_null()) {
+ if (dn->lock.can_read(client)) {
+ dout(12) << "traverse: miss on null+readable dentry " << path[depth] << " " << *dn << dendl;
+ return -ENOENT;
+ } else {
+ dout(12) << "miss on dentry " << *dn << ", can't read due to lock" << dendl;
+ dn->lock.add_waiter(SimpleLock::WAIT_RD, _get_waiter(mdr, req, fin));
+ return 1;
+ }
}
if (dnl && !dnl->is_null()) {