From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757244Ab0BXQGZ (ORCPT ); Wed, 24 Feb 2010 11:06:25 -0500 Received: from smtp-out.google.com ([216.239.33.17]:10416 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756294Ab0BXQGY (ORCPT ); Wed, 24 Feb 2010 11:06:24 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=oVH/3l1ivpYm10oZhQHSJKHhOPhmMDuQ9iWshyj58/FI4FEVKB2yUfWSTGCqahBke OkN3+M6BMFmeH22O/PxAg== MIME-Version: 1.0 In-Reply-To: References: <4B849B73.1040106@cn.fujitsu.com> Date: Wed, 24 Feb 2010 08:06:20 -0800 Message-ID: <6599ad831002240806p69fcbc01l1173dd2ad971dac9@mail.gmail.com> Subject: Re: [PATCH -mm] cgroups: fix failure path in cgroup_write_event_control() From: Paul Menage To: "Kirill A. Shutemov" Cc: Li Zefan , Andrew Morton , KAMEZAWA Hiroyuki , LKML , "containers@lists.osdl.org" Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2010 at 5:28 AM, Kirill A. Shutemov wrote: >> >> Using a single goto label to cleanup multi failure paths can >> get things wrong quite easily, while multi labels makes the >> code cleaner. > > I disagree. > It's easer to make mistake on changing code with multi failure > paths, if you want to move a code within function. I'm on Kirill's side here. Being able to have a single "cleanup everything" error path makes the code a lot more maintainable. It may be inappropriate for really performance-critical functions, but that's not the case here. Paul