Thread (26 messages) 26 messages, 3 authors, 2022-03-30

Re: [PATCH 13/14] loop: remove lo_refcount and avoid lo_mutex in ->open / ->release

From: Christoph Hellwig <hch@lst.de>
Date: 2022-03-29 13:25:13

Thinking a bit more, I really don't think the existing any refcount
check protects us against a different tread modififying the backing
file.  When a process has a file descriptor to a loop device open
and is multithreaded (or forks) we can still have multiple threads
manipulating the loop state.

That being said I do not think we really need that refcount check
at all - once loop_clr_fd set lo->lo_state to Lo_rundown under the
global lock we know that loop_validate_file will error out on it
due to the lo_state != Lo_bound check.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help