zfs_ioctl.c: remove zfs_nfsshare_inited & zfs_nfsshare_inited and update code do not use it
Actually they're only referenced by zfs_ioc_share and zfs's _fini. They are checked before critical sections for setting up the other services. The variables are just an (unreliable) shortcut to skip a mutex_enter and a couple of NULL checks.
Similarly, they are used for _fini to decide whether to free resources from zfs_io_share, but that could be replaced with NULL checks instead.
Actually there appears to be a bug where if zfs_ioc_share() fails partway, the zfs_*share_inited variables are not set and _fini() will not clean the resources up.
I would vote for removing the variables, which will make this more reliable.
No data to display