epoll: remove extraneous clone of ready_list

A simplification that doesn't impact the epoll implementation's logic.

It is not necessary to clone the ready_list before reading its
`is_empty` state.

This avoids the clone step but more importantly avoids the invisible
drop step of the clone.
This commit is contained in:
Frank Rehwinkel 2024-10-02 08:13:11 -04:00 committed by Oli Scherer
parent 86bb1373aa
commit 81202c8b13

View File

@ -475,8 +475,7 @@ fn epoll_wait(
let epoll_file_description = epfd
.downcast::<Epoll>()
.ok_or_else(|| err_unsup_format!("non-epoll FD passed to `epoll_wait`"))?;
let binding = epoll_file_description.get_ready_list();
ready_list_empty = binding.mapping.borrow_mut().is_empty();
ready_list_empty = epoll_file_description.ready_list.mapping.borrow().is_empty();
thread_ids = epoll_file_description.thread_id.borrow_mut();
}
if timeout == 0 || !ready_list_empty {