Skip to content

Commit

Permalink
cgroup: fix error return value of cgroup_addrm_files()
Browse files Browse the repository at this point in the history
cgroup_addrm_files() incorrectly returned 0 after add failure.  Fix
it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
  • Loading branch information
Tejun Heo committed Feb 23, 2016
1 parent 1619b6d commit b598dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3369,7 +3369,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css,
bool is_add)
{
struct cftype *cft, *cft_end = NULL;
int ret;
int ret = 0;

lockdep_assert_held(&cgroup_mutex);

Expand Down Expand Up @@ -3398,7 +3398,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css,
cgroup_rm_file(cgrp, cft);
}
}
return 0;
return ret;
}

static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add)
Expand Down

0 comments on commit b598dde

Please sign in to comment.