Downgrade locks to read

This commit is contained in:
Wildan M
2026-04-29 21:26:44 +07:00
parent ab08d47aa8
commit ba28216ae8
6 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -1004,7 +1004,7 @@ pub fn bulk_add_fds(
return Ok(0);
}
let current_lock = context::current();
let mut current = current_lock.write(token.token());
let mut current = current_lock.read(token.token());
let (current, mut token) = current.token_split();
let files: Vec<FileDescriptor> = descriptions
@@ -1048,7 +1048,7 @@ pub fn bulk_insert_fds(
.read_usize()?;
let current_lock = context::current();
let mut current = current_lock.write(token.token());
let mut current = current_lock.read(token.token());
let (current, mut token) = current.token_split();
if first_fd == usize::MAX {
+1 -1
View File
@@ -65,7 +65,7 @@ impl UnmapResult {
};
let (scheme_id, number) = {
let desc = description.write(token.token());
let desc = description.read(token.token());
(desc.scheme, desc.number)
};