From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] xfs: fix double unlock in xfs_swap_extents() Date: Fri, 8 May 2009 02:28:19 -0400 Message-ID: <20090508062819.GB1689@infradead.org> References: <1241745202-7452-1-git-send-email-felixb@sgi.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <1241745202-7452-1-git-send-email-felixb-sJ/iWh9BUns@public.gmane.org> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Felix Blyakher Cc: xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org, kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, a.beregalov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org The patch looks good, but a little nitpick: On Thu, May 07, 2009 at 08:13:22PM -0500, Felix Blyakher wrote: > out: > kmem_free(tempifp); > return error; > > +out_unlock: > + xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); > + xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); > + goto out; > + > out_trans_cancel: > xfs_trans_cancel(tp, 0); > goto out_unlock; this would be more readable as: out_trans_cancel: xfs_trans_cancel(tp, 0); out_unlock: xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); goto out;