From 3850bbf030bc0f9c2b9d7a1685b2b7c61a1825af Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Wed, 15 Jun 2016 14:15:22 +0800 Subject: [PATCH] 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 --- src/mds/Server.cc | 2 -- 1 file changed, 2 deletions(-) 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)) -- 2.47.3