msg/Message: fix set_middle vs throttler

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-10-23 18:10:00 -05:00
parent a9651282f7
commit e7bf50b27a

View File

@ -361,10 +361,10 @@ public:
void set_middle(bufferlist& bl) {
if (byte_throttler)
byte_throttler->put(payload.length());
byte_throttler->put(middle.length());
middle.claim(bl, buffer::list::CLAIM_ALLOW_NONSHAREABLE);
if (byte_throttler)
byte_throttler->take(payload.length());
byte_throttler->take(middle.length());
}
bufferlist& get_middle() { return middle; }