aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-20 22:29:33 +0200
committerBrian Behlendorf <[email protected]>2021-05-26 14:50:08 -0700
commita0cb347ceac4840e988fc6148db21bffbf80cb68 (patch)
treefa8f5bd3a4079b653bd90d9c774c19901179a6c0 /lib
parentc71a2bb52fd3ec4db44890e05c071b137ec420b3 (diff)
libzfs_core: fini: don't check for refcount twice
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12094
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs_core/libzfs_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libzfs_core/libzfs_core.c b/lib/libzfs_core/libzfs_core.c
index 1e6bbcd56..7a71b7a54 100644
--- a/lib/libzfs_core/libzfs_core.c
+++ b/lib/libzfs_core/libzfs_core.c
@@ -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);