Project

General

Profile

Bug #7006

zfs_ioctl.c: remove zfs_nfsshare_inited & zfs_nfsshare_inited and update code do not use it

Added by Igor Kozhukhov over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-05-27
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

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.

-Albert

No data to display

Also available in: Atom PDF