Re: [PATCH] cgroup: Simplify code in css_set_move_task

From: Michal Koutný
Date: Thu Oct 27 2022 - 04:06:27 EST


Hello.

On Thu, Oct 20, 2022 at 07:47:01AM +0000, "haifeng.xu" <haifeng.xu@xxxxxxxxxx> 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

Attachment: signature.asc
Description: Digital signature