[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423134923.osuljlalsd27awz3@quack3>
Date: Tue, 23 Apr 2024 15:49:23 +0200
From: Jan Kara <jack@...e.cz>
To: Xiu Jianfeng <xiujianfeng@...wei.com>
Cc: viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
mhocko@...nel.org, roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, akpm@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH -next] cgroup: Introduce css_is_online() helper
On Sat 20-04-24 09:44:28, Xiu Jianfeng wrote:
> Introduce css_is_online() helper to test if whether the specified
> css is online, avoid testing css.flags with CSS_ONLINE directly
> outside of cgroup.c.
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
One style nit below:
> +/*
> + * css_is_online - test whether the specified css is online
> + * @css: target css
> + */
> +static inline bool css_is_online(struct cgroup_subsys_state *css)
> +{
> + return !!(css->flags & CSS_ONLINE);
> +}
Since the return type is 'bool', you don't need the !! magic in the
statement above.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists