summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-07-12 14:40:15 -0700
committerTony Hutter <[email protected]>2019-09-25 11:27:49 -0700
commit428a63cc62c31056b602e80ec072d8093ca049c8 (patch)
treec30324885abef227153938b122feba968a868c19
parent3982d959c5b8577993740c03392c4efa750c0479 (diff)
Retire unused spl_{mutex,rwlock}_{init_fini}
These functions are unused and can be removed along with the spl-mutex.c and spl-rwlock.c source files. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Tomohiro Kusumi <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9029
-rw-r--r--include/spl/sys/mutex.h3
-rw-r--r--include/spl/sys/rwlock.h4
-rw-r--r--module/spl/Makefile.in2
-rw-r--r--module/spl/spl-generic.c38
-rw-r--r--module/spl/spl-mutex.c30
-rw-r--r--module/spl/spl-rwlock.c28
6 files changed, 13 insertions, 92 deletions
diff --git a/include/spl/sys/mutex.h b/include/spl/sys/mutex.h
index a61f35c61..73da23685 100644
--- a/include/spl/sys/mutex.h
+++ b/include/spl/sys/mutex.h
@@ -181,7 +181,4 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \
/* NOTE: do not dereference mp after this point */ \
}
-int spl_mutex_init(void);
-void spl_mutex_fini(void);
-
#endif /* _SPL_MUTEX_H */
diff --git a/include/spl/sys/rwlock.h b/include/spl/sys/rwlock.h
index 89e02fa8f..60f5bfd98 100644
--- a/include/spl/sys/rwlock.h
+++ b/include/spl/sys/rwlock.h
@@ -196,10 +196,6 @@ RW_READ_HELD(krwlock_t *rwp)
downgrade_write(SEM(rwp)); \
spl_rw_lockdep_on_maybe(rwp); \
})
-
/* END CSTYLED */
-int spl_rw_init(void);
-void spl_rw_fini(void);
-
#endif /* _SPL_RWLOCK_H */
diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in
index 3bcbf63cb..e16666aa9 100644
--- a/module/spl/Makefile.in
+++ b/module/spl/Makefile.in
@@ -16,10 +16,8 @@ $(MODULE)-objs += spl-kmem.o
$(MODULE)-objs += spl-kmem-cache.o
$(MODULE)-objs += spl-kobj.o
$(MODULE)-objs += spl-kstat.o
-$(MODULE)-objs += spl-mutex.o
$(MODULE)-objs += spl-proc.o
$(MODULE)-objs += spl-procfs-list.o
-$(MODULE)-objs += spl-rwlock.o
$(MODULE)-objs += spl-taskq.o
$(MODULE)-objs += spl-thread.o
$(MODULE)-objs += spl-tsd.o
diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c
index cd2fa2020..3c5ef60bd 100644
--- a/module/spl/spl-generic.c
+++ b/module/spl/spl-generic.c
@@ -694,51 +694,41 @@ spl_init(void)
if ((rc = spl_kvmem_init()))
goto out1;
- if ((rc = spl_mutex_init()))
- goto out2;
-
- if ((rc = spl_rw_init()))
- goto out3;
-
if ((rc = spl_tsd_init()))
- goto out4;
+ goto out2;
if ((rc = spl_taskq_init()))
- goto out5;
+ goto out3;
if ((rc = spl_kmem_cache_init()))
- goto out6;
+ goto out4;
if ((rc = spl_vn_init()))
- goto out7;
+ goto out5;
if ((rc = spl_proc_init()))
- goto out8;
+ goto out6;
if ((rc = spl_kstat_init()))
- goto out9;
+ goto out7;
if ((rc = spl_zlib_init()))
- goto out10;
+ goto out8;
return (rc);
-out10:
- spl_kstat_fini();
-out9:
- spl_proc_fini();
out8:
- spl_vn_fini();
+ spl_kstat_fini();
out7:
- spl_kmem_cache_fini();
+ spl_proc_fini();
out6:
- spl_taskq_fini();
+ spl_vn_fini();
out5:
- spl_tsd_fini();
+ spl_kmem_cache_fini();
out4:
- spl_rw_fini();
+ spl_taskq_fini();
out3:
- spl_mutex_fini();
+ spl_tsd_fini();
out2:
spl_kvmem_fini();
out1:
@@ -755,8 +745,6 @@ spl_fini(void)
spl_kmem_cache_fini();
spl_taskq_fini();
spl_tsd_fini();
- spl_rw_fini();
- spl_mutex_fini();
spl_kvmem_fini();
}
diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c
deleted file mode 100644
index ba818862b..000000000
--- a/module/spl/spl-mutex.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
- * Copyright (C) 2007 The Regents of the University of California.
- * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
- * Written by Brian Behlendorf <[email protected]>.
- * UCRL-CODE-235197
- *
- * This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
- *
- * The SPL is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * The SPL is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with the SPL. If not, see <http://www.gnu.org/licenses/>.
- *
- * Solaris Porting Layer (SPL) Mutex Implementation.
- */
-
-#include <sys/mutex.h>
-
-int spl_mutex_init(void) { return 0; }
-void spl_mutex_fini(void) { }
diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c
deleted file mode 100644
index 10f7c38db..000000000
--- a/module/spl/spl-rwlock.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
- * Copyright (C) 2007 The Regents of the University of California.
- * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
- * Written by Brian Behlendorf <[email protected]>.
- * UCRL-CODE-235197
- *
- * This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
- *
- * The SPL is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * The SPL is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with the SPL. If not, see <http://www.gnu.org/licenses/>.
- *
- * Solaris Porting Layer (SPL) Reader/Writer Lock Implementation.
- */
-
-int spl_rw_init(void) { return 0; }
-void spl_rw_fini(void) { }