Re: [PATCH -next] cgroup: Introduce css_is_online() helper

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

 



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@xxxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

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@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux