From: Somnath Roy Date: Thu, 31 Jul 2014 22:03:53 +0000 (-0700) Subject: FileStore: Introduced a RLock instead of WLock X-Git-Tag: v0.85~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b24db81ea060b563ff9c2249b054064a27ec42e2;p=ceph.git FileStore: Introduced a RLock instead of WLock While calling index->collection_version, there is no need to hold WLock at the index level. RLock should be sufficient. Signed-off-by: Somnath Roy --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index feb317162ca6..4481c93f56b6 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4248,7 +4248,7 @@ int FileStore::collection_version_current(coll_t c, uint32_t *version) return r; assert(NULL != index.index); - RWLock::WLocker l((index.index)->access_lock); + RWLock::RLocker l((index.index)->access_lock); *version = index->collection_version(); if (*version == target_version)