On Mon, Nov 29, 2021 at 07:36:27PM +0900, Tetsuo Handa wrote: > If the caller just want to call ioctl(LOOP_CTL_GET_FREE) followed by > ioctl(LOOP_CONFIGURE), deferring __loop_clr_fd() would be fine. > > But the caller might want to unmount as soon as fput(filp) from __loop_clr_fd() completes. > I think we need to wait for __loop_clr_fd() from lo_release() to complete. Anything else could have a reference to this or other files as well. So I can't see how deferring the clear to a different context can be any kind of problem in practice.