HomeFreeBSD

zfs_get_vfs: reference a requested filesystem instead of vfs_busy-ing it

Description

zfs_get_vfs: reference a requested filesystem instead of vfs_busy-ing it

The only consumer of zfs_get_vfs, zfs_unmount_snap, does not need
the filesystem to be busy, it just need a reference that it can pass
to dounmount.

Also, previously the code was racy as it unbusied the filesystem
before taking a reference on it.

Now the code should be simpler and safer.

MFC after: 2 weeks
Sponsored by: Panzura

Details

Provenance
avgAuthored on
Parents
rS323479: zfs: tighten debug versions of ZTOV and VTOZ
Branches
Unknown
Tags
Unknown