From 63a21b41340a236a258e9ae82a823c24c30cf0dd Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 17 Jul 2013 11:09:35 +0800 Subject: [PATCH] mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking() For acquiring/cancelling xlock, the lock state transitions for dentry lock and other types of locks are the same. So I think the "type != CEPH_LOCK_DN" check doesn't make sense. Signed-off-by: Yan, Zheng --- src/mds/Locker.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 254bbb2044bd3..d2d47fbb55dbf 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -543,13 +543,11 @@ void Locker::cancel_locking(Mutation *mut, set *pneed_issue) dout(10) << "cancel_locking " << *lock << " on " << *mut << dendl; if (lock->get_parent()->is_auth()) { - if (lock->get_type() != CEPH_LOCK_DN) { - bool need_issue = false; - if (lock->get_state() == LOCK_PREXLOCK) - _finish_xlock(lock, -1, &need_issue); - if (need_issue) - pneed_issue->insert(static_cast(lock->get_parent())); - } + bool need_issue = false; + if (lock->get_state() == LOCK_PREXLOCK) + _finish_xlock(lock, -1, &need_issue); + if (need_issue) + pneed_issue->insert(static_cast(lock->get_parent())); } mut->finish_locking(lock); } -- 2.39.5