diff options
Diffstat (limited to 'module/icp/io/skein_mod.c')
| -rw-r--r-- | module/icp/io/skein_mod.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c index 18026807fd84..5ee36af12bcb 100644 --- a/module/icp/io/skein_mod.c +++ b/module/icp/io/skein_mod.c @@ -272,18 +272,18 @@ skein_digest_update_uio(skein_ctx_t *ctx, const crypto_data_t *data) size_t length = data->cd_length; uint_t vec_idx = 0; size_t cur_len; - uio_t *uio = data->cd_uio; + zfs_uio_t *uio = data->cd_uio; /* we support only kernel buffer */ - if (uio_segflg(uio) != UIO_SYSSPACE) + if (zfs_uio_segflg(uio) != UIO_SYSSPACE) return (CRYPTO_ARGUMENTS_BAD); /* * Jump to the first iovec containing data to be * digested. */ - offset = uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == uio_iovcnt(uio)) { + offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); + if (vec_idx == zfs_uio_iovcnt(uio)) { /* * The caller specified an offset that is larger than the * total size of the buffers it provided. @@ -294,16 +294,16 @@ skein_digest_update_uio(skein_ctx_t *ctx, const crypto_data_t *data) /* * Now do the digesting on the iovecs. */ - while (vec_idx < uio_iovcnt(uio) && length > 0) { - cur_len = MIN(uio_iovlen(uio, vec_idx) - offset, length); - SKEIN_OP(ctx, Update, (uint8_t *)uio_iovbase(uio, vec_idx) + while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { + cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, length); + SKEIN_OP(ctx, Update, (uint8_t *)zfs_uio_iovbase(uio, vec_idx) + offset, cur_len); length -= cur_len; vec_idx++; offset = 0; } - if (vec_idx == uio_iovcnt(uio) && length > 0) { + if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { /* * The end of the specified iovec's was reached but * the length requested could not be processed, i.e. @@ -322,19 +322,19 @@ static int skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) { - off_t offset = digest->cd_offset; - uint_t vec_idx = 0; - uio_t *uio = digest->cd_uio; + off_t offset = digest->cd_offset; + uint_t vec_idx = 0; + zfs_uio_t *uio = digest->cd_uio; /* we support only kernel buffer */ - if (uio_segflg(uio) != UIO_SYSSPACE) + if (zfs_uio_segflg(uio) != UIO_SYSSPACE) return (CRYPTO_ARGUMENTS_BAD); /* * Jump to the first iovec containing ptr to the digest to be returned. */ - offset = uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == uio_iovcnt(uio)) { + offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); + if (vec_idx == zfs_uio_iovcnt(uio)) { /* * The caller specified an offset that is larger than the * total size of the buffers it provided. @@ -342,10 +342,10 @@ skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest, return (CRYPTO_DATA_LEN_RANGE); } if (offset + CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen) <= - uio_iovlen(uio, vec_idx)) { + zfs_uio_iovlen(uio, vec_idx)) { /* The computed digest will fit in the current iovec. */ SKEIN_OP(ctx, Final, - (uchar_t *)uio_iovbase(uio, vec_idx) + offset); + (uchar_t *)zfs_uio_iovbase(uio, vec_idx) + offset); } else { uint8_t *digest_tmp; off_t scratch_offset = 0; @@ -357,11 +357,11 @@ skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest, if (digest_tmp == NULL) return (CRYPTO_HOST_MEMORY); SKEIN_OP(ctx, Final, digest_tmp); - while (vec_idx < uio_iovcnt(uio) && length > 0) { - cur_len = MIN(uio_iovlen(uio, vec_idx) - offset, + while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { + cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, length); bcopy(digest_tmp + scratch_offset, - uio_iovbase(uio, vec_idx) + offset, cur_len); + zfs_uio_iovbase(uio, vec_idx) + offset, cur_len); length -= cur_len; vec_idx++; @@ -370,7 +370,7 @@ skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest, } kmem_free(digest_tmp, CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen)); - if (vec_idx == uio_iovcnt(uio) && length > 0) { + if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { /* * The end of the specified iovec's was reached but * the length requested could not be processed, i.e. |
