Re: git: 10037d0978f8 - main - fusefs: Implement support for the auto_unmount option kernel-side
- Reply: Konstantin Belousov : "Re: git: 10037d0978f8 - main - fusefs: Implement support for the auto_unmount option kernel-side"
- In reply to: Konstantin Belousov : "Re: git: 10037d0978f8 - main - fusefs: Implement support for the auto_unmount option kernel-side"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Feb 2026 19:27:41 UTC
On Sun, Jan 25, 2026 at 10:39 PM Konstantin Belousov <kostikbel@gmail.com> wrote: > > > > + vfs_ref(fdata->mp); > Don't you need to take the reference when the fdata is created and mp member > is initialized, and not here? > > What guarantees that the mp is still ours? > In fact, I think that you should use vfs_busy() and not vfs_ref(), > since what prevents mp from being unmounted under us? Using vfs_busy() before dounmount() results in a soft hang: - vfs_busy increments mp->mnt_lockref in https://github.com/freebsd/freebsd-src/blob/98bdf63f6e94be42a1787de73608de15bcb3419a/sys/kern/vfs_subr.c#L929 - dounmount spins until mp->mnt_lockref becomes 0 in https://github.com/freebsd/freebsd-src/blob/98bdf63f6e94be42a1787de73608de15bcb3419a/sys/kern/vfs_mount.c#L2318-L2322 This results in a FUSE process to hang in the "mount drain" state.