diff mbox

[3/6] mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking()

Message ID 1374049723-19274-4-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng July 17, 2013, 8:28 a.m. UTC
From: "Yan, Zheng" <zheng.z.yan@intel.com>

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>
---
 src/mds/Locker.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index afaac1c..aaf6590 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, &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, &need_issue);
+    if (need_issue)
+      pneed_issue->insert(static_cast<CInode *>(lock->get_parent()));
   }
   mut->finish_locking(lock);
 }