lkml.org 
[lkml]   [2011]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 7/7] memcg : remove ugly vairable initialization by callers
    On Fri, 21 Jan 2011 15:50:51 +0900
    KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

    > This is a promised one.
    > ==
    > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    >
    > This patch is for removing initialization in caller of memory cgroup
    > function. Some memory cgroup uses following style to bring the result
    > of start function to the end function for avoiding races.
    >
    > mem_cgroup_start_A(&(*ptr))
    > /* Something very complicated can happen here. */
    > mem_cgroup_end_A(*ptr)
    >
    > In some calls, *ptr should be initialized to NULL be caller. But
    > it's ugly. This patch fixes that *ptr is initialized by _start
    > function.
    >
    > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

    Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>


    \
     
     \ /
      Last update: 2011-01-21 10:21    [W:0.023 / U:91.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site