mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2026-01-27 12:35:36 +01:00
cgroup/misc: Store atomic64_t reads to u64
Change 'new_usage' type to u64 so it can be compared with unsigned 'max' and 'capacity' properly even if the value crosses the signed boundary. Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
32bf85c60c
commit
714e08cc3e
|
|
@ -142,7 +142,7 @@ int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount)
|
||||||
struct misc_cg *i, *j;
|
struct misc_cg *i, *j;
|
||||||
int ret;
|
int ret;
|
||||||
struct misc_res *res;
|
struct misc_res *res;
|
||||||
s64 new_usage;
|
u64 new_usage;
|
||||||
|
|
||||||
if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type])))
|
if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type])))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user