libzfs_core: fini: don't check for refcount twice
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12094
This commit is contained in:
parent
c71a2bb52f
commit
a0cb347cea
@ -158,8 +158,7 @@ libzfs_core_fini(void)
|
||||
(void) pthread_mutex_lock(&g_lock);
|
||||
ASSERT3S(g_refcount, >, 0);
|
||||
|
||||
if (g_refcount > 0)
|
||||
g_refcount--;
|
||||
g_refcount--;
|
||||
|
||||
if (g_refcount == 0 && g_fd != -1) {
|
||||
(void) close(g_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user