From: Samuel Just Date: Wed, 19 Jun 2013 22:11:28 +0000 (-0700) Subject: FileStore: get_index prior to taking fdcache_lock in lfn_unlink X-Git-Tag: v0.66~46 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a5d989c39ed626ae7836cdd867bdcf67b61fc06;p=ceph.git 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 --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 8576032dccb8..049539b73afe 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;