summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-07-17 11:09:35 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-08-05 11:09:07 +0800
commit63a21b41340a236a258e9ae82a823c24c30cf0dd (patch)
tree842bb5be298ecfefc2db76fc2839a7a71d93a24c
parent3c3b2ceb03e7294704f5bf3e1e420012a0166585 (diff)
downloadceph-63a21b41340a236a258e9ae82a823c24c30cf0dd.tar.gz
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 <zheng.z.yan@intel.com>
-rw-r--r--src/mds/Locker.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 254bbb2044b..d2d47fbb55d 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -543,13 +543,11 @@ void Locker::cancel_locking(Mutation *mut, set<CInode*> *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<CInode *>(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<CInode *>(lock->get_parent()));
}
mut->finish_locking(lock);
}