From: xie xingguo Date: Wed, 15 Jun 2016 06:15:22 +0000 (+0800) Subject: Server: avoid duplicated call to acquire_locks() X-Git-Tag: v11.0.0~156^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9710%2Fhead;p=ceph.git Server: avoid duplicated call to acquire_locks() For snapped case we may call acquire_locks() twice, which is not necessary. Signed-off-by: xie xingguo --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index e7ef6251d844..624857da7880 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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))