commit:     9399b06afe40f694ceac26c67c236144f76a5274
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 11 11:19:31 2023 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Sat Mar 11 11:19:31 2023 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9399b06a

Linux patch 6.1.17

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README             |   4 ++
 1016_linux-6.1.17.patch | 123 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/0000_README b/0000_README
index aab72b3b..e2811191 100644
--- a/0000_README
+++ b/0000_README
@@ -107,6 +107,10 @@ Patch:  1015_linux-6.1.16.patch
 From:   https://www.kernel.org
 Desc:   Linux 6.1.16
 
+Patch:  1016_linux-6.1.17.patch
+From:   https://www.kernel.org
+Desc:   Linux 6.1.17
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1016_linux-6.1.17.patch b/1016_linux-6.1.17.patch
new file mode 100644
index 00000000..fb9f6cec
--- /dev/null
+++ b/1016_linux-6.1.17.patch
@@ -0,0 +1,123 @@
+diff --git a/Makefile b/Makefile
+index 5ac6895229e9c..db482a420dcaf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 6
+ PATCHLEVEL = 1
+-SUBLEVEL = 16
++SUBLEVEL = 17
+ EXTRAVERSION =
+ NAME = Hurr durr I'ma ninja sloth
+ 
+diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
+index f8b21bead6552..7c91d9195da8d 100644
+--- a/block/blk-cgroup.c
++++ b/block/blk-cgroup.c
+@@ -87,32 +87,14 @@ static void blkg_free_workfn(struct work_struct *work)
+ {
+       struct blkcg_gq *blkg = container_of(work, struct blkcg_gq,
+                                            free_work);
+-      struct request_queue *q = blkg->q;
+       int i;
+ 
+-      /*
+-       * pd_free_fn() can also be called from blkcg_deactivate_policy(),
+-       * in order to make sure pd_free_fn() is called in order, the deletion
+-       * of the list blkg->q_node is delayed to here from blkg_destroy(), and
+-       * blkcg_mutex is used to synchronize blkg_free_workfn() and
+-       * blkcg_deactivate_policy().
+-       */
+-      if (q)
+-              mutex_lock(&q->blkcg_mutex);
+-
+       for (i = 0; i < BLKCG_MAX_POLS; i++)
+               if (blkg->pd[i])
+                       blkcg_policy[i]->pd_free_fn(blkg->pd[i]);
+ 
+-      if (blkg->parent)
+-              blkg_put(blkg->parent);
+-
+-      if (q) {
+-              list_del_init(&blkg->q_node);
+-              mutex_unlock(&q->blkcg_mutex);
+-              blk_put_queue(q);
+-      }
+-
++      if (blkg->q)
++              blk_put_queue(blkg->q);
+       free_percpu(blkg->iostat_cpu);
+       percpu_ref_exit(&blkg->refcnt);
+       kfree(blkg);
+@@ -145,6 +127,8 @@ static void __blkg_release(struct rcu_head *rcu)
+ 
+       /* release the blkcg and parent blkg refs this blkg has been holding */
+       css_put(&blkg->blkcg->css);
++      if (blkg->parent)
++              blkg_put(blkg->parent);
+       blkg_free(blkg);
+ }
+ 
+@@ -441,14 +425,9 @@ static void blkg_destroy(struct blkcg_gq *blkg)
+       lockdep_assert_held(&blkg->q->queue_lock);
+       lockdep_assert_held(&blkcg->lock);
+ 
+-      /*
+-       * blkg stays on the queue list until blkg_free_workfn(), see details in
+-       * blkg_free_workfn(), hence this function can be called from
+-       * blkcg_destroy_blkgs() first and again from blkg_destroy_all() before
+-       * blkg_free_workfn().
+-       */
+-      if (hlist_unhashed(&blkg->blkcg_node))
+-              return;
++      /* Something wrong if we are trying to remove same group twice */
++      WARN_ON_ONCE(list_empty(&blkg->q_node));
++      WARN_ON_ONCE(hlist_unhashed(&blkg->blkcg_node));
+ 
+       for (i = 0; i < BLKCG_MAX_POLS; i++) {
+               struct blkcg_policy *pol = blkcg_policy[i];
+@@ -460,6 +439,7 @@ static void blkg_destroy(struct blkcg_gq *blkg)
+       blkg->online = false;
+ 
+       radix_tree_delete(&blkcg->blkg_tree, blkg->q->id);
++      list_del_init(&blkg->q_node);
+       hlist_del_init_rcu(&blkg->blkcg_node);
+ 
+       /*
+@@ -1246,7 +1226,6 @@ int blkcg_init_disk(struct gendisk *disk)
+       int ret;
+ 
+       INIT_LIST_HEAD(&q->blkg_list);
+-      mutex_init(&q->blkcg_mutex);
+ 
+       new_blkg = blkg_alloc(&blkcg_root, disk, GFP_KERNEL);
+       if (!new_blkg)
+@@ -1484,7 +1463,6 @@ void blkcg_deactivate_policy(struct request_queue *q,
+       if (queue_is_mq(q))
+               blk_mq_freeze_queue(q);
+ 
+-      mutex_lock(&q->blkcg_mutex);
+       spin_lock_irq(&q->queue_lock);
+ 
+       __clear_bit(pol->plid, q->blkcg_pols);
+@@ -1503,7 +1481,6 @@ void blkcg_deactivate_policy(struct request_queue *q,
+       }
+ 
+       spin_unlock_irq(&q->queue_lock);
+-      mutex_unlock(&q->blkcg_mutex);
+ 
+       if (queue_is_mq(q))
+               blk_mq_unfreeze_queue(q);
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index 1680b6e1e5362..891f8cbcd0436 100644
+--- a/include/linux/blkdev.h
++++ b/include/linux/blkdev.h
+@@ -487,7 +487,6 @@ struct request_queue {
+       DECLARE_BITMAP          (blkcg_pols, BLKCG_MAX_POLS);
+       struct blkcg_gq         *root_blkg;
+       struct list_head        blkg_list;
+-      struct mutex            blkcg_mutex;
+ #endif
+ 
+       struct queue_limits     limits;

Reply via email to