]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: Introduced a RLock instead of WLock 2070/head
authorSomnath Roy <somnath.roy@sandisk.com>
Thu, 31 Jul 2014 22:03:53 +0000 (15:03 -0700)
committerSomnath Roy <somnath.roy@sandisk.com>
Thu, 14 Aug 2014 22:28:30 +0000 (15:28 -0700)
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 <somnath.roy@sandisk.com>
src/os/FileStore.cc

index feb317162ca671a5170cc6a6ec59bd75e0a2deee..4481c93f56b65f409a6dbeadc864118ba5bc84eb 100644 (file)
@@ -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)