memcgroup: return negative error code in mem_cgroup_create()
Subsystems (2)
PATCH 3/3 memcgroup: return negative error code in mem_cgroup_create()
Cgroup requires the subsystem to return negative error code on error in the create method.
Signed-off-by Li Zefan <[email protected]>
--- mm/memcontrol.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c +2 -2
@@ -1101,7 +1101,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont) mem =kzalloc (sizeof (struct mem_cgroup ),GFP_KERNEL );if (mem ==NULL ) -return NULL ; +return ERR_PTR (-ENOMEM );res_counter_init (&mem->res);
@@ -1117,7 +1117,7 @@ free_out:free_mem_cgroup_per_zone_info (mem, node);if (cont->parent !=NULL )kfree (mem); -return NULL ; +return ERR_PTR (-ENOMEM ); } static void mem_cgroup_pre_destroy(struct cgroup_subsys *ss,
Signature · 1 line
1.5.4.rc3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Balbir Singh
Acked-byQuoted 5 lines · Li Zefan
Cgroup requires the subsystem to return negative error code on error in the create method.
Signed-off-by Li Zefan <[email protected]>
Acked-by Balbir Singh <[email protected]>
Signature · 4 lines
Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL
Quoted 5 lines · Li Zefan
Cgroup requires the subsystem to return negative error code on error in the create method.
Signed-off-by Li Zefan <[email protected]>
Acked-by Balbir Singh <[email protected]>
Signature · 4 lines
Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL