diff options
author | Arvind Sankar <[email protected]> | 2020-06-15 14:26:43 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:21:18 -0700 |
commit | c3fe42aabd9f8879500437e2be2968b47e8b6797 (patch) | |
tree | f2a66702cabdeba3772e36bcfb0a43ef41404e79 /module | |
parent | 65c7cc49bfcf49d38fc84552a17d7e8a3268e58e (diff) |
Remove dead code
Delete unused functions.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'module')
-rw-r--r-- | module/icp/include/sys/bitmap.h | 4 | ||||
-rw-r--r-- | module/os/freebsd/spl/acl_common.c | 22 | ||||
-rw-r--r-- | module/os/freebsd/spl/spl_kstat.c | 16 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_vnops.c | 19 | ||||
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 6 | ||||
-rw-r--r-- | module/zfs/ddt.c | 6 | ||||
-rw-r--r-- | module/zfs/zrlock.c | 9 |
7 files changed, 2 insertions, 80 deletions
diff --git a/module/icp/include/sys/bitmap.h b/module/icp/include/sys/bitmap.h index b1f6823e6..4e86ee70e 100644 --- a/module/icp/include/sys/bitmap.h +++ b/module/icp/include/sys/bitmap.h @@ -157,9 +157,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ diff --git a/module/os/freebsd/spl/acl_common.c b/module/os/freebsd/spl/acl_common.c index 8eea4695e..ee89c8233 100644 --- a/module/os/freebsd/spl/acl_common.c +++ b/module/os/freebsd/spl/acl_common.c @@ -1707,25 +1707,3 @@ ace_trivial_common(void *acep, int aclcnt, } return (0); } - -uint64_t -ace_walk(void *datap, uint64_t cookie, int aclcnt, uint16_t *flags, - uint16_t *type, uint32_t *mask) -{ - ace_t *acep = datap; - - if (cookie >= aclcnt) - return (0); - - *flags = acep[cookie].a_flags; - *type = acep[cookie].a_type; - *mask = acep[cookie++].a_access_mask; - - return (cookie); -} - -int -ace_trivial(ace_t *acep, int aclcnt) -{ - return (ace_trivial_common(acep, aclcnt, ace_walk)); -} diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c index 1b149a544..234b56a49 100644 --- a/module/os/freebsd/spl/spl_kstat.c +++ b/module/os/freebsd/spl/spl_kstat.c @@ -288,22 +288,6 @@ kstat_delete(kstat_t *ksp) } void -kstat_set_string(char *dst, const char *src) -{ - - bzero(dst, KSTAT_STRLEN); - (void) strncpy(dst, src, KSTAT_STRLEN - 1); -} - -void -kstat_named_init(kstat_named_t *knp, const char *name, uchar_t data_type) -{ - - kstat_set_string(knp->name, name); - knp->data_type = data_type; -} - -void kstat_waitq_enter(kstat_io_t *kiop) { hrtime_t new, delta; diff --git a/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c index acf3aca44..20c2709c9 100644 --- a/module/os/linux/zfs/zfs_vnops.c +++ b/module/os/linux/zfs/zfs_vnops.c @@ -4563,25 +4563,6 @@ zfs_inactive(struct inode *ip) } /* - * Bounds-check the seek operation. - * - * IN: ip - inode seeking within - * ooff - old file offset - * noffp - pointer to new file offset - * - * RETURN: 0 if success - * EINVAL if new offset invalid - */ -/* ARGSUSED */ -int -zfs_seek(struct inode *ip, offset_t ooff, offset_t *noffp) -{ - if (S_ISDIR(ip->i_mode)) - return (0); - return ((*noffp < 0 || *noffp > MAXOFFSET_T) ? EINVAL : 0); -} - -/* * Fill pages with data from the disk. */ static int diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 12d448094..d1ce86c89 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -713,12 +713,6 @@ zvol_find_by_dev(dev_t dev) return (NULL); } -void -zvol_validate_dev(zvol_state_t *zv) -{ - ASSERT3U(MINOR(zv->zv_zso->zvo_dev) & ZVOL_MINOR_MASK, ==, 0); -} - static struct kobject * zvol_probe(dev_t dev, int *part, void *arg) { diff --git a/module/zfs/ddt.c b/module/zfs/ddt.c index 33dad8bdf..b94a9f54e 100644 --- a/module/zfs/ddt.c +++ b/module/zfs/ddt.c @@ -595,12 +595,6 @@ ddt_decompress(uchar_t *src, void *dst, size_t s_len, size_t d_len) } ddt_t * -ddt_select_by_checksum(spa_t *spa, enum zio_checksum c) -{ - return (spa->spa_ddt[c]); -} - -ddt_t * ddt_select(spa_t *spa, const blkptr_t *bp) { return (spa->spa_ddt[BP_GET_CHECKSUM(bp)]); diff --git a/module/zfs/zrlock.c b/module/zfs/zrlock.c index 6deb25648..a4def6053 100644 --- a/module/zfs/zrlock.c +++ b/module/zfs/zrlock.c @@ -157,15 +157,6 @@ zrl_exit(zrlock_t *zrl) } int -zrl_refcount(zrlock_t *zrl) -{ - ASSERT3S(zrl->zr_refcount, >, ZRL_DESTROYED); - - int n = (int)zrl->zr_refcount; - return (n <= 0 ? 0 : n); -} - -int zrl_is_zero(zrlock_t *zrl) { ASSERT3S(zrl->zr_refcount, >, ZRL_DESTROYED); |