From: Greg Kroah-Hartman Date: Tue, 28 Jan 2020 12:04:24 +0000 (+0100) Subject: fix up bitmap patch for 4.14 and 4.9 X-Git-Tag: v4.4.212~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c220b7644afdc1dbf9ce0236dc4a02e675442db;p=thirdparty%2Fkernel%2Fstable-queue.git fix up bitmap patch for 4.14 and 4.9 --- diff --git a/queue-4.14/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch b/queue-4.14/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch index 9eec4a9a736..9dbaf3a462a 100644 --- a/queue-4.14/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch +++ b/queue-4.14/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch @@ -53,10 +53,11 @@ Signed-off-by: Greg Kroah-Hartman #include #include -@@ -1129,6 +1130,25 @@ bitmap_from_u32array(unsigned long *bitm - if (src_idx < nwords) - part = buf[src_idx++]; - +@@ -1212,3 +1213,22 @@ void bitmap_copy_le(unsigned long *dst, + } + EXPORT_SYMBOL(bitmap_copy_le); + #endif ++ +unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags) +{ + return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long), @@ -75,7 +76,3 @@ Signed-off-by: Greg Kroah-Hartman + kfree(bitmap); +} +EXPORT_SYMBOL(bitmap_free); -+ - #if BITS_PER_LONG == 64 - if (src_idx < nwords) - part |= ((unsigned long) buf[src_idx++]) << 32; diff --git a/queue-4.9/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch b/queue-4.9/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch index 858ea8c62bf..5eb7bdad8f5 100644 --- a/queue-4.9/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch +++ b/queue-4.9/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch @@ -53,10 +53,11 @@ Signed-off-by: Greg Kroah-Hartman #include #include -@@ -1129,6 +1130,25 @@ bitmap_from_u32array(unsigned long *bitm - if (src_idx < nwords) - part = buf[src_idx++]; - +@@ -1212,3 +1213,22 @@ void bitmap_copy_le(unsigned long *dst, + } + EXPORT_SYMBOL(bitmap_copy_le); + #endif ++ +unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags) +{ + return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long), @@ -75,7 +76,3 @@ Signed-off-by: Greg Kroah-Hartman + kfree(bitmap); +} +EXPORT_SYMBOL(bitmap_free); -+ - #if BITS_PER_LONG == 64 - if (src_idx < nwords) - part |= ((unsigned long) buf[src_idx++]) << 32;