]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/lzjb.c
Fix typo/etc in module/zfs/zfs_ctldir.c
[mirror_zfs.git] / module / zfs / lzjb.c
index 43d0df055d8e1eb013c0af3682aa2424af043da7..ae18467011cbb7463c7e385f3a7b3c4b6a867d44 100644 (file)
@@ -50,17 +50,19 @@ lzjb_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
 {
        uchar_t *src = s_start;
        uchar_t *dst = d_start;
-       uchar_t *cpy, *copymap = NULL;
+       uchar_t *cpy;
+       uchar_t *copymap = NULL;
        int copymask = 1 << (NBBY - 1);
        int mlen, offset, hash;
        uint16_t *hp;
        uint16_t *lempel;
 
-       lempel = kmem_zalloc(LEMPEL_SIZE * sizeof (uint16_t), KM_PUSHPAGE);
+       lempel = kmem_zalloc(LEMPEL_SIZE * sizeof (uint16_t), KM_SLEEP);
        while (src < (uchar_t *)s_start + s_len) {
                if ((copymask <<= 1) == (1 << NBBY)) {
                        if (dst >= (uchar_t *)d_start + d_len - 1 - 2 * NBBY) {
-                               kmem_free(lempel, LEMPEL_SIZE*sizeof(uint16_t));
+                               kmem_free(lempel,
+                                   LEMPEL_SIZE*sizeof (uint16_t));
                                return (s_len);
                        }
                        copymask = 1;
@@ -104,7 +106,8 @@ lzjb_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
        uchar_t *src = s_start;
        uchar_t *dst = d_start;
        uchar_t *d_end = (uchar_t *)d_start + d_len;
-       uchar_t *cpy, copymap = 0;
+       uchar_t *cpy;
+       uchar_t copymap = 0;
        int copymask = 1 << (NBBY - 1);
 
        while (dst < d_end) {