Skip to content

Commit

Permalink
Retire unused spl_{mutex,rwlock}_{init_fini}
Browse files Browse the repository at this point in the history
These functions are unused and can be removed along
with the spl-mutex.c and spl-rwlock.c source files.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#9029
  • Loading branch information
behlendorf authored and tonyhutter committed Sep 18, 2019
1 parent 3889184 commit 1d64002
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 92 deletions.
3 changes: 0 additions & 3 deletions include/spl/sys/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
4 changes: 0 additions & 4 deletions include/spl/sys/rwlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions module/spl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 13 additions & 25 deletions module/spl/spl-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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();
}

Expand Down
30 changes: 0 additions & 30 deletions module/spl/spl-mutex.c

This file was deleted.

28 changes: 0 additions & 28 deletions module/spl/spl-rwlock.c

This file was deleted.

0 comments on commit 1d64002

Please sign in to comment.