Merge PR #19702 into master

* refs/pull/19702/head:
	client: avoid remove same cap twice

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
This commit is contained in:
Patrick Donnelly 2018-01-09 16:56:08 -08:00
commit 8ab4c18ec1
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -4088,7 +4088,6 @@ void Client::trim_caps(MetaSession *s, uint64_t max)
// disposable non-auth cap
if (!(get_caps_used(in.get()) & ~oissued & mine)) {
ldout(cct, 20) << " removing unused, unneeded non-auth cap on " << *in << dendl;
remove_cap(cap, true);
cap = (remove_cap(cap, true), nullptr);
/* N.B. no need to push onto anchor, as we are only removing one cap */
trimmed++;