As long as mnt_ref is not zero there can be a consumer that might try
to access mnt_vnodecovered. For this reason the covered vnode must not
be freed until mnt_ref goes to zero.
So, move the release of the covered vnode to vfs_mount_destroy.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 11513 Build 11867: arc lint + arc unit
Event Timeline
Comment Actions
There is also one use of vfs_mount_destroy() in zfs, but I did not looked at it. You should know it much better.
sys/kern/vfs_mount.c | ||
---|---|---|
826 | Look at this fragment. I believe that you need vref(vp) before the call to vfs_mount_destroy() at line 822. |
sys/kern/vfs_mount.c | ||
---|---|---|
826 | Maybe setting mnt_vnodecovered to NULL would be a better solution? |
sys/kern/vfs_mount.c | ||
---|---|---|
826 | Fine with me. |
Comment Actions
clear mnt_vnodecovered before calling vfs_mount_destroy in case of the mount failure,
that's safe to do because the new struct mount is not visible to the outside world