]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2024 10:56:19 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2024 10:56:19 +0000 (12:56 +0200)
added patches:
btrfs-rename-bitmap_set_bits-btrfs_bitmap_set_bits.patch
s390-cio-rename-bitmap_size-idset_bitmap_size.patch

queue-5.10/btrfs-rename-bitmap_set_bits-btrfs_bitmap_set_bits.patch [new file with mode: 0644]
queue-5.10/s390-cio-rename-bitmap_size-idset_bitmap_size.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/btrfs-rename-bitmap_set_bits-btrfs_bitmap_set_bits.patch b/queue-5.10/btrfs-rename-bitmap_set_bits-btrfs_bitmap_set_bits.patch
new file mode 100644 (file)
index 0000000..e0b1a62
--- /dev/null
@@ -0,0 +1,48 @@
+From 4ca532d64648d4776d15512caed3efea05ca7195 Mon Sep 17 00:00:00 2001
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+Date: Wed, 27 Mar 2024 16:23:47 +0100
+Subject: btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()
+
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+
+commit 4ca532d64648d4776d15512caed3efea05ca7195 upstream.
+
+bitmap_set_bits() does not start with the FS' prefix and may collide
+with a new generic helper one day. It operates with the FS-specific
+types, so there's no change those two could do the same thing.
+Just add the prefix to exclude such possible conflict.
+
+Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
+Acked-by: David Sterba <dsterba@suse.com>
+Reviewed-by: Yury Norov <yury.norov@gmail.com>
+Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/free-space-cache.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/fs/btrfs/free-space-cache.c
++++ b/fs/btrfs/free-space-cache.c
+@@ -1755,9 +1755,9 @@ static void bitmap_clear_bits(struct btr
+       ctl->free_space -= bytes;
+ }
+-static void bitmap_set_bits(struct btrfs_free_space_ctl *ctl,
+-                          struct btrfs_free_space *info, u64 offset,
+-                          u64 bytes)
++static void btrfs_bitmap_set_bits(struct btrfs_free_space_ctl *ctl,
++                                struct btrfs_free_space *info, u64 offset,
++                                u64 bytes)
+ {
+       unsigned long start, count, end;
+       int extent_delta = 1;
+@@ -2077,7 +2077,7 @@ static u64 add_bytes_to_bitmap(struct bt
+       bytes_to_set = min(end - offset, bytes);
+-      bitmap_set_bits(ctl, info, offset, bytes_to_set);
++      btrfs_bitmap_set_bits(ctl, info, offset, bytes_to_set);
+       /*
+        * We set some bytes, we have no idea what the max extent size is
diff --git a/queue-5.10/s390-cio-rename-bitmap_size-idset_bitmap_size.patch b/queue-5.10/s390-cio-rename-bitmap_size-idset_bitmap_size.patch
new file mode 100644 (file)
index 0000000..354f22f
--- /dev/null
@@ -0,0 +1,61 @@
+From c1023f5634b9bfcbfff0dc200245309e3cde9b54 Mon Sep 17 00:00:00 2001
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+Date: Wed, 27 Mar 2024 16:23:45 +0100
+Subject: s390/cio: rename bitmap_size() -> idset_bitmap_size()
+
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+
+commit c1023f5634b9bfcbfff0dc200245309e3cde9b54 upstream.
+
+bitmap_size() is a pretty generic name and one may want to use it for
+a generic bitmap API function. At the same time, its logic is not
+"generic", i.e. it's not just `nbits -> size of bitmap in bytes`
+converter as it would be expected from its name.
+Add the prefix 'idset_' used throughout the file where the function
+resides.
+
+Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
+Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
+Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/s390/cio/idset.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/s390/cio/idset.c
++++ b/drivers/s390/cio/idset.c
+@@ -16,7 +16,7 @@ struct idset {
+       unsigned long bitmap[];
+ };
+-static inline unsigned long bitmap_size(int num_ssid, int num_id)
++static inline unsigned long idset_bitmap_size(int num_ssid, int num_id)
+ {
+       return bitmap_size(size_mul(num_ssid, num_id));
+ }
+@@ -25,11 +25,12 @@ static struct idset *idset_new(int num_s
+ {
+       struct idset *set;
+-      set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id));
++      set = vmalloc(sizeof(struct idset) +
++                    idset_bitmap_size(num_ssid, num_id));
+       if (set) {
+               set->num_ssid = num_ssid;
+               set->num_id = num_id;
+-              memset(set->bitmap, 0, bitmap_size(num_ssid, num_id));
++              memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id));
+       }
+       return set;
+ }
+@@ -41,7 +42,8 @@ void idset_free(struct idset *set)
+ void idset_fill(struct idset *set)
+ {
+-      memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id));
++      memset(set->bitmap, 0xff,
++             idset_bitmap_size(set->num_ssid, set->num_id));
+ }
+ static inline void idset_add(struct idset *set, int ssid, int id)
index cbb1d3640bc5c936f6393e7d3ed037cabaf9c3b9..def5a781bd4f555a8deb593bc058f464cf963f3c 100644 (file)
@@ -14,3 +14,5 @@ btrfs-tree-checker-add-dev-extent-item-checks.patch
 drm-amdgpu-actually-check-flags-for-all-context-ops.patch
 memcg_write_event_control-fix-a-user-triggerable-oops.patch
 drm-amdgpu-jpeg2-properly-set-atomics-vmid-field.patch
+s390-cio-rename-bitmap_size-idset_bitmap_size.patch
+btrfs-rename-bitmap_set_bits-btrfs_bitmap_set_bits.patch