Merge pull request #22500 from thinkercui/bugfix

osd: fix memory leak in EC fast and error read

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
Josh Durgin 2018-06-13 16:57:57 -04:00 committed by GitHub
commit 8b83d44c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1257,6 +1257,13 @@ void ECBackend::complete_read_op(ReadOp &rop, RecoveryMessages *m)
reqiter->second.cb = nullptr;
}
}
// if the read op is over. clean all the data of this tid.
for (set<pg_shard_t>::iterator iter = rop.in_progress.begin();
iter != rop.in_progress.end();
iter++) {
shard_to_read_map[*iter].erase(rop.tid);
}
rop.in_progress.clear();
tid_to_read_map.erase(rop.tid);
}