From 8a5d989c39ed626ae7836cdd867bdcf67b61fc06 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 19 Jun 2013 15:11:28 -0700 Subject: [PATCH] FileStore: get_index prior to taking fdcache_lock in lfn_unlink We take the fdcache_lock while holding onto index objects elsewhere in the code. Fixes: #5389 Reviewed-by: David Zafman Signed-off-by: Samuel Just --- src/os/FileStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 8576032dccb..049539b73af 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -321,11 +321,11 @@ int FileStore::lfn_link(coll_t c, coll_t cid, const hobject_t& o) int FileStore::lfn_unlink(coll_t cid, const hobject_t& o, const SequencerPosition &spos) { - Mutex::Locker l(fdcache_lock); Index index; int r = get_index(cid, &index); if (r < 0) return r; + Mutex::Locker l(fdcache_lock); { IndexedPath path; int exist; -- 2.47.3