the list of buffers is protected by mutex m_lock. when dump_data() fails
and puts unwritten buffers back into the list, it needs to reaquire the
lock
Fixes: http://tracker.ceph.com/issues/40188
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
8645e24dd4fb3ecc9f02b34a1be916620b5f71b1)
ret = safe_write(fd, delim.c_str(), delim.length());
}
if (ret < 0) {
+ std::scoped_lock lock(m_lock);
for (; iter != l.end(); ++iter) {
bufferlist& bl = *iter;
data.push_back(bl);