From: "Yan, Zheng" <[email protected]>

Xlock imports and capability imports are uncorrelated, we should call
xlock_import() even there is no capability import.

Signed-off-by: Yan, Zheng <[email protected]>
---
 src/mds/Server.cc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index 8584e60..7659b23 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -5838,16 +5838,16 @@ void Server::_rename_apply(MDRequest *mdr, CDentry 
*srcdn, CDentry *destdn, CDen
       if (mdr->more()->cap_imports.count(destdnl->get_inode())) {
        mds->mdcache->migrator->finish_import_inode_caps(destdnl->get_inode(), 
srcdn->authority().first, 
                                                         
mdr->more()->cap_imports[destdnl->get_inode()]);
-       /* hack: add an auth pin for each xlock we hold. These were
-        * remote xlocks previously but now they're local and
-        * we're going to try and unpin when we xlock_finish. */
-       for (set<SimpleLock *>::iterator i = mdr->xlocks.begin();
-           i !=  mdr->xlocks.end();
-           ++i)
-         if ((*i)->get_parent() == destdnl->get_inode() &&
-             !(*i)->is_locallock())
-           mds->locker->xlock_import(*i, mdr);
       }
+      /* hack: add an auth pin for each xlock we hold. These were
+       * remote xlocks previously but now they're local and
+       * we're going to try and unpin when we xlock_finish. */
+      for (set<SimpleLock *>::iterator i = mdr->xlocks.begin();
+         i !=  mdr->xlocks.end();
+         ++i)
+       if ((*i)->get_parent() == destdnl->get_inode() &&
+           !(*i)->is_locallock())
+         mds->locker->xlock_import(*i, mdr);
       
       // hack: fix auth bit
       in->state_set(CInode::STATE_AUTH);
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to