Merge pull request #9713 from xiexingguo/xxg-wip-server_droppin

server: drop locks and auth pins before waiting for trunc

Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2016-06-15 23:43:28 +01:00 committed by GitHub
commit b56d1f48e7

View File

@ -3751,6 +3751,8 @@ void Server::handle_client_setattr(MDRequestRef& mdr)
if (truncating_smaller && pi->is_truncating()) {
dout(10) << " waiting for pending truncate from " << pi->truncate_from
<< " to " << pi->truncate_size << " to complete on " << *cur << dendl;
mds->locker->drop_locks(mdr.get());
mdr->drop_local_auth_pins();
cur->add_waiter(CInode::WAIT_TRUNC, new C_MDS_RetryRequest(mdcache, mdr));
mds->mdlog->flush();
return;