Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340062

[PATCH 1/6] cgroup: fix error return value of cgroup_addrm_files()

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 1/6] cgroup: fix error return value of cgroup_addrm_files()
Date 2016-02-23 00:10 +0100
Message-ID <r57M6-4Su-13@gated-at.bofh.it> (permalink)
References <r57M5-4Su-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


cgroup_addrm_files() incorrectly returned 0 after add failure.  Fix
it.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 kernel/cgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 7ad6191..68b032d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -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);
 
@@ -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)
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHSET] cgroup: misc fixes and cleanups Tejun Heo <tj@kernel.org> - 2016-02-23 00:10 +0100
  [PATCH 1/6] cgroup: fix error return value of cgroup_addrm_files() Tejun Heo <tj@kernel.org> - 2016-02-23 00:10 +0100
  [PATCH 2/6] Revert "cgroup: add cgroup_subsys->css_e_css_changed()" Tejun Heo <tj@kernel.org> - 2016-02-23 00:10 +0100
  [PATCH 4/6] cgroup: convert for_each_subsys_which() to do-while style Tejun Heo <tj@kernel.org> - 2016-02-23 00:10 +0100
  [PATCH 3/6] cgroup: s/child_subsys_mask/subtree_ss_mask/ Tejun Heo <tj@kernel.org> - 2016-02-23 00:10 +0100
  Re: [PATCHSET] cgroup: misc fixes and cleanups Johannes Weiner <hannes@cmpxchg.org> - 2016-02-23 02:40 +0100
  Re: [PATCHSET] cgroup: misc fixes and cleanups Tejun Heo <tj@kernel.org> - 2016-02-23 04:30 +0100
  Re: [PATCHSET] cgroup: misc fixes and cleanups Zefan Li <lizefan@huawei.com> - 2016-02-23 05:00 +0100

csiph-web