mirror of
https://github.com/ceph/ceph
synced 2025-02-18 08:28:02 +00:00
client: Mutex::Locker -> std::lock_guard
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b023007be7
commit
de8153fba6
File diff suppressed because it is too large
Load Diff
@ -492,7 +492,7 @@ public:
|
||||
|
||||
snapid_t ll_get_snapid(Inode *in);
|
||||
vinodeno_t ll_get_vino(Inode *in) {
|
||||
Mutex::Locker lock(client_lock);
|
||||
std::lock_guard lock(client_lock);
|
||||
return _get_vino(in);
|
||||
}
|
||||
// get inode from faked ino
|
||||
|
@ -85,14 +85,14 @@ BarrierContext::BarrierContext(Client *c, uint64_t ino) :
|
||||
|
||||
void BarrierContext::write_nobarrier(C_Block_Sync &cbs)
|
||||
{
|
||||
Mutex::Locker locker(lock);
|
||||
std::lock_guard locker(lock);
|
||||
cbs.state = CBlockSync_State_Unclaimed;
|
||||
outstanding_writes.push_back(cbs);
|
||||
}
|
||||
|
||||
void BarrierContext::write_barrier(C_Block_Sync &cbs)
|
||||
{
|
||||
Mutex::Locker locker(lock);
|
||||
std::lock_guard locker(lock);
|
||||
barrier_interval &iv = cbs.iv;
|
||||
|
||||
{ /* find blocking commit--intrusive no help here */
|
||||
@ -117,7 +117,7 @@ void BarrierContext::write_barrier(C_Block_Sync &cbs)
|
||||
|
||||
void BarrierContext::commit_barrier(barrier_interval &civ)
|
||||
{
|
||||
Mutex::Locker locker(lock);
|
||||
std::lock_guard locker(lock);
|
||||
|
||||
/* we commit outstanding writes--if none exist, we don't care */
|
||||
if (outstanding_writes.size() == 0)
|
||||
@ -159,7 +159,7 @@ void BarrierContext::commit_barrier(barrier_interval &civ)
|
||||
|
||||
void BarrierContext::complete(C_Block_Sync &cbs)
|
||||
{
|
||||
Mutex::Locker locker(lock);
|
||||
std::lock_guard locker(lock);
|
||||
BlockSyncList::iterator iter =
|
||||
BlockSyncList::s_iterator_to(cbs);
|
||||
|
||||
|
@ -1215,7 +1215,7 @@ uint64_t CephFuse::Handle::fino_snap(uint64_t fino)
|
||||
vinodeno_t vino = client->map_faked_ino(fino);
|
||||
return vino.snapid;
|
||||
} else {
|
||||
Mutex::Locker l(stag_lock);
|
||||
std::lock_guard l(stag_lock);
|
||||
uint64_t stag = FINO_STAG(fino);
|
||||
ceph_assert(stag_snap_map.count(stag));
|
||||
return stag_snap_map[stag];
|
||||
@ -1252,7 +1252,7 @@ uint64_t CephFuse::Handle::make_fake_ino(inodeno_t ino, snapid_t snapid)
|
||||
if (snapid == CEPH_NOSNAP && ino == client->get_root_ino())
|
||||
return FUSE_ROOT_ID;
|
||||
|
||||
Mutex::Locker l(stag_lock);
|
||||
std::lock_guard l(stag_lock);
|
||||
auto p = snap_stag_map.find(snapid);
|
||||
if (p != snap_stag_map.end()) {
|
||||
inodeno_t fino = MAKE_FINO(ino, p->second);
|
||||
|
Loading…
Reference in New Issue
Block a user