From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933379AbbBBOTq (ORCPT ); Mon, 2 Feb 2015 09:19:46 -0500 Received: from verein.lst.de ([213.95.11.211]:44168 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481AbbBBOTp (ORCPT ); Mon, 2 Feb 2015 09:19:45 -0500 Date: Mon, 2 Feb 2015 15:19:42 +0100 From: Christoph Hellwig To: Omar Sandoval Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] posix_acl: fix reference leaks in posix_acl_create Message-ID: <20150202141942.GA17447@lst.de> References: <0d8672e771b8fc1fef94db4b40b418afc8763c2b.1422338890.git.osandov@osandov.com> <20150128170952.GB17528@lst.de> <20150202075502.GA24678@mew> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150202075502.GA24678@mew> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 01, 2015 at 11:55:02PM -0800, Omar Sandoval wrote: > There are already a couple of return paths in posix_acl_create, and > there are only these two error cases, so I think gotos might actually > make the code more confusing. In any case, here's an idea: > > posix_acl: fix reference leaks in posix_acl_create > > get_acl gets a reference which we must release in the error cases. > > Signed-off-by: Omar Sandoval Thanks, this one looks good to me. Reviewed-by: Christoph Hellwig