lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/4] freezer_cg: use thaw_process() in unfreeze_cgroup()
    Li Zefan wrote:
    > Don't duplicate the implementation of thaw_process().

    looks OK but you should remove __thaw_process() which is unused
    now.

    thanks,

    C.

    > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
    > ---
    > kernel/cgroup_freezer.c | 15 ++++-----------
    > 1 files changed, 4 insertions(+), 11 deletions(-)
    >
    > diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
    > index 6fadafe..3ea57e4 100644
    > --- a/kernel/cgroup_freezer.c
    > +++ b/kernel/cgroup_freezer.c
    > @@ -275,25 +275,18 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
    > return num_cant_freeze_now ? -EBUSY : 0;
    > }
    >
    > -static int unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
    > +static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
    > {
    > struct cgroup_iter it;
    > struct task_struct *task;
    >
    > cgroup_iter_start(cgroup, &it);
    > while ((task = cgroup_iter_next(cgroup, &it))) {
    > - int do_wake;
    > -
    > - task_lock(task);
    > - do_wake = __thaw_process(task);
    > - task_unlock(task);
    > - if (do_wake)
    > - wake_up_process(task);
    > + thaw_process(task);
    > }
    > cgroup_iter_end(cgroup, &it);
    > - freezer->state = CGROUP_THAWED;
    >
    > - return 0;
    > + freezer->state = CGROUP_THAWED;
    > }
    >
    > static int freezer_change_state(struct cgroup *cgroup,
    > @@ -320,7 +313,7 @@ static int freezer_change_state(struct cgroup *cgroup,
    > }
    > /* state == FREEZING and goal_state == THAWED, so unfreeze */
    > case CGROUP_FROZEN:
    > - retval = unfreeze_cgroup(cgroup, freezer);
    > + unfreeze_cgroup(cgroup, freezer);
    > break;
    > default:
    > break;



    \
     
     \ /
      Last update: 2008-10-21 09:19    [W:0.027 / U:0.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site