Skip to content

Commit

Permalink
[NIT] repeat RLock
Browse files Browse the repository at this point in the history
Signed-off-by: zhuangbowei.zbw <zhuangbowei.zbw@alibaba-inc.com>
  • Loading branch information
WaberZhuang committed Dec 8, 2023
1 parent dfe3574 commit 9c64989
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/overlaybd/cache/full_file_cache/cache_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ ssize_t FileCacheStore::do_preadv2(const struct iovec *iov, int iovcnt, off_t of
// multiple cacheStore preadvs but cacheFile preadv only once
ssize_t ret;
cachePool_->updateLru(iterator_);
auto lruEntry = static_cast<FileCachePool::LruEntry *>(iterator_->second.get());
photon::scoped_rwlock rl(lruEntry->rw_lock_, photon::RLOCK);
SCOPE_AUDIT_THRESHOLD(1UL * 1000, "file:read", AU_FILEOP("", offset, ret));
ret = localFile_->preadv(iov, iovcnt, offset);
return ret;
Expand Down

0 comments on commit 9c64989

Please sign in to comment.