summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-06-19 15:11:28 -0700
committerSamuel Just <sam.just@inktank.com>2013-06-19 15:24:51 -0700
commit8a5d989c39ed626ae7836cdd867bdcf67b61fc06 (patch)
tree4acb61b4ded42beb93df6f45f11f11880df31ad1
parent02b3c552659299c7c7c2e789f0660f0add2f639f (diff)
downloadceph-8a5d989c39ed626ae7836cdd867bdcf67b61fc06.tar.gz
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 <david.zafman@inktank.com> Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/os/FileStore.cc2
1 files changed, 1 insertions, 1 deletions
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;