Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2dda81ca31dc73e695ff8b83351f7aaefbef192a Commit: 2dda81ca31dc73e695ff8b83351f7aaefbef192a Parent: 7fde4c3eb7ee68828d76a2148ed6d70b6a794add Author: Li Zefan <[EMAIL PROTECTED]> AuthorDate: Sat Feb 23 15:24:14 2008 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sat Feb 23 17:13:25 2008 -0800
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]> Acked-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> Acked-by: Balbir Singh <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/memcontrol.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index bb4d7ac..631002d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1100,7 +1100,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); @@ -1116,7 +1116,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, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html