Commit b598dde3 authored by Tejun Heo's avatar Tejun Heo

cgroup: fix error return value of cgroup_addrm_files()

cgroup_addrm_files() incorrectly returned 0 after add failure.  Fix
it.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
parent 1619b6d4
...@@ -3369,7 +3369,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css, ...@@ -3369,7 +3369,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css,
bool is_add) bool is_add)
{ {
struct cftype *cft, *cft_end = NULL; struct cftype *cft, *cft_end = NULL;
int ret; int ret = 0;
lockdep_assert_held(&cgroup_mutex); lockdep_assert_held(&cgroup_mutex);
...@@ -3398,7 +3398,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css, ...@@ -3398,7 +3398,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css,
cgroup_rm_file(cgrp, cft); cgroup_rm_file(cgrp, cft);
} }
} }
return 0; return ret;
} }
static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment