From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [patch] locks: missing unlock on error in generic_add_lease() Date: Wed, 13 Nov 2013 17:07:31 +0300 Message-ID: <20131113140731.GN5302@mwanda> References: <20131113075627.GJ25541@elgon.mountain> <20131113135103.GA27536@pad.fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , Alexander Viro , linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:23517 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759080Ab3KMOHc (ORCPT ); Wed, 13 Nov 2013 09:07:32 -0500 Content-Disposition: inline In-Reply-To: <20131113135103.GA27536@pad.fieldses.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 13, 2013 at 08:51:04AM -0500, J. Bruce Fields wrote: > On Wed, Nov 13, 2013 at 10:56:27AM +0300, Dan Carpenter wrote: > > We should unlock here before returning. > > A buggy-caller case, so shouldn't be a huge deal, but obviously should > be fixed, thanks! > > Acked-by: J. Bruce Fields > > I'm assuming Al will pick it up. > > (Though error = -EAGAIN and "goto out" would be more consistent with > other exits.) -EINVAL, but yeah you're right. I'll resend. regards, dan carpenter