curve-fuse: fix miss use GetInodeAttr[Locked]

Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
This commit is contained in:
Hanqing Wu 2022-09-06 19:38:39 +08:00 committed by Hanqing Wu
parent c8f089e185
commit d4468fa6eb
2 changed files with 5 additions and 5 deletions

View File

@ -680,7 +680,7 @@ CURVEFS_ERROR FuseClient::MakeNode(fuse_req_t req, fuse_ino_t parent,
}
InodeAttr attr;
inodeWrapper->GetInodeAttrLocked(&attr);
inodeWrapper->GetInodeAttr(&attr);
GetDentryParamFromInodeAttr(option_, attr, e);
return ret;
}
@ -1276,7 +1276,7 @@ CURVEFS_ERROR FuseClient::FuseOpSymlink(fuse_req_t req, const char *link,
}
InodeAttr attr;
inodeWrapper->GetInodeAttrLocked(&attr);
inodeWrapper->GetInodeAttr(&attr);
GetDentryParamFromInodeAttr(option_, attr, e);
return ret;
}
@ -1347,7 +1347,7 @@ CURVEFS_ERROR FuseClient::FuseOpLink(fuse_req_t req, fuse_ino_t ino,
}
InodeAttr attr;
inodeWrapper->GetInodeAttrLocked(&attr);
inodeWrapper->GetInodeAttr(&attr);
GetDentryParamFromInodeAttr(option_, attr, e);
return ret;
}

View File

@ -176,7 +176,7 @@ CURVEFS_ERROR InodeCacheManagerImpl::GetInodeAttr(uint64_t inodeId,
std::shared_ptr<InodeWrapper> inodeWrapper;
bool ok = iCache_->Get(inodeId, &inodeWrapper);
if (ok) {
inodeWrapper->GetInodeAttrLocked(out);
inodeWrapper->GetInodeAttr(out);
return CURVEFS_ERROR::OK;
}
@ -214,7 +214,7 @@ CURVEFS_ERROR InodeCacheManagerImpl::BatchGetInodeAttr(
bool ok = iCache_->Get(*iter, &inodeWrapper);
if (ok) {
InodeAttr tmpAttr;
inodeWrapper->GetInodeAttrLocked(&tmpAttr);
inodeWrapper->GetInodeAttr(&tmpAttr);
attr->emplace_back(tmpAttr);
iter = inodeIds->erase(iter);
} else {