lkml.org 
[lkml]   [2022]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: Simplify code in css_set_move_task
Hello.

On Thu, Oct 20, 2022 at 07:47:01AM +0000, "haifeng.xu" <haifeng.xu@shopee.com> wrote:
> - lockdep_assert_held(&css_set_lock);
> + if (!cset || css_set_populated(cset))
> + return;

1) the guard should be css_set_populated() ^ populated (when unsetting
the populated trait)

2) I'd keep the lockdep_assert_held() after it anyway.

Also the commit message should explain what's the reason to move
css_set_populated() after css_set_move_task().


Thanks,
Michal
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-10-27 10:07    [W:0.093 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site