]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up bitmap patch for 4.14 and 4.9
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jan 2020 12:04:24 +0000 (13:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jan 2020 12:04:24 +0000 (13:04 +0100)
queue-4.14/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch
queue-4.9/bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch

index 9eec4a9a736c9aee53db61960498b67779f817a3..9dbaf3a462ab36449217258d37cded879f1f0eaa 100644 (file)
@@ -53,10 +53,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  #include <linux/string.h>
  #include <linux/uaccess.h>
  
-@@ -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 <gregkh@linuxfoundation.org>
 +      kfree(bitmap);
 +}
 +EXPORT_SYMBOL(bitmap_free);
-+
- #if BITS_PER_LONG == 64
-               if (src_idx < nwords)
-                       part |= ((unsigned long) buf[src_idx++]) << 32;
index 858ea8c62bf379f16900e83e8fe46cf6693082a2..5eb7bdad8f5b558ea2726a86e47cf1cb3ef616ef 100644 (file)
@@ -53,10 +53,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  #include <linux/string.h>
  #include <linux/uaccess.h>
  
-@@ -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 <gregkh@linuxfoundation.org>
 +      kfree(bitmap);
 +}
 +EXPORT_SYMBOL(bitmap_free);
-+
- #if BITS_PER_LONG == 64
-               if (src_idx < nwords)
-                       part |= ((unsigned long) buf[src_idx++]) << 32;