]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking()
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 17 Jul 2013 03:09:35 +0000 (11:09 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 5 Aug 2013 03:09:07 +0000 (11:09 +0800)
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

index 254bbb2044bd30e1c39010d04dfe29e45848e07c..d2d47fbb55dbfdbf686f5e8f4b6ad32c2f6157c1 100644 (file)
@@ -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);
 }