Patch "cgroup: Avoid extra dereference in css_populate_dir()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cgroup: Avoid extra dereference in css_populate_dir()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cgroup-avoid-extra-dereference-in-css_populate_dir.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit da7b80013536ace44318db1dde06020c0150f531
Author: Kamalesh Babulal <kamalesh.babulal@xxxxxxxxxx>
Date:   Tue Sep 12 12:34:35 2023 +0530

    cgroup: Avoid extra dereference in css_populate_dir()
    
    [ Upstream commit d24f05987ce8bf61e62d86fedbe47523dc5c3393 ]
    
    Use css directly instead of dereferencing it from &cgroup->self, while
    adding the cgroup v2 cft base and psi files in css_populate_dir(). Both
    points to the same css, when css->ss is NULL, this avoids extra deferences
    and makes code consistent in usage across the function.
    
    Signed-off-by: Kamalesh Babulal <kamalesh.babulal@xxxxxxxxxx>
    Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 489c25713edcb..455f67ff31b57 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1751,13 +1751,13 @@ static int css_populate_dir(struct cgroup_subsys_state *css)
 
 	if (!css->ss) {
 		if (cgroup_on_dfl(cgrp)) {
-			ret = cgroup_addrm_files(&cgrp->self, cgrp,
+			ret = cgroup_addrm_files(css, cgrp,
 						 cgroup_base_files, true);
 			if (ret < 0)
 				return ret;
 
 			if (cgroup_psi_enabled()) {
-				ret = cgroup_addrm_files(&cgrp->self, cgrp,
+				ret = cgroup_addrm_files(css, cgrp,
 							 cgroup_psi_files, true);
 				if (ret < 0)
 					return ret;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux