From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 2/9] cgroup: fix error path of cgroup_addrm_files() Date: Thu, 11 Jul 2013 14:43:00 +0800 Message-ID: <51DE53F4.1020203@huawei.com> References: <1372463145-4245-1-git-send-email-tj@kernel.org> <1372463145-4245-3-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1372463145-4245-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On 2013/6/29 7:45, Tejun Heo wrote: > cgroup_addrm_files() mishandled error return value from > cgroup_add_file() and returns error iff the last file fails to create. > As we're in the process of cleaning up file add/rm error handling and > will reliably propagate file creation failures, there's no point in > keeping adding files after a failure. > > Replace the broken error collection logic with immediate error return. > While at it, add lockdep assertions and function comment. > > Signed-off-by: Tejun Heo Acked-by: Li Zefan