Skip to content

Commit 70de9d2

Browse files
committed
docs(driver): explain why buffer_id can be out of bounds
1 parent a49967b commit 70de9d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

compio-driver/src/buffer_pool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ impl Shared {
351351
fn reset(&self, buffer_id: u16, ptr: BufPtr) {
352352
unsafe {
353353
self.with(|inner| {
354+
// This method might be called after `BufferPoolRoot::release`.
354355
if let Some(slot) = inner.bufs.get_mut(buffer_id as usize) {
355356
*slot = Some(ptr);
356357
inner.ctrl.reset(buffer_id, ptr, inner.size);

0 commit comments

Comments
 (0)