]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Server: avoid duplicated call to acquire_locks() 9710/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 15 Jun 2016 06:15:22 +0000 (14:15 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 15 Jun 2016 07:04:49 +0000 (15:04 +0800)
For snapped case we may call acquire_locks() twice,
which is not necessary.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mds/Server.cc

index e7ef6251d844b6e69e4a44961a095bb9c9a54ac8..624857da7880259bf03a1d7f1b663efd2ae90e24 100644 (file)
@@ -2990,8 +2990,6 @@ void Server::handle_client_open(MDRequestRef& mdr)
   //  and that data itself is flushed so that we can read the snapped data off disk.
   if (mdr->snapid != CEPH_NOSNAP && !cur->is_dir()) {
     rdlocks.insert(&cur->filelock);
-    if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
-      return;
   }
 
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))