From: Al Viro Subject: Re: [PATCH] Use of getblk differs between locations Date: Tue, 11 Oct 2005 01:05:03 +0100 Message-ID: <20051011000503.GR7992@ftp.linux.org.uk> References: <20051010204517.GA30867@br.ibm.com> <20051010214605.GA11427@br.ibm.com> <20051010223636.GB11427@br.ibm.com> <20051010163648.3e305b63.akpm@osdl.org> <20051011000734.GC13399@br.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Anton Altaparmakov , mikulas@artax.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, ext2-devel@lists.sourceforge.net, hirofumi@mail.parknet.co.jp, linux-ntfs-dev@lists.sourceforge.net, aia21@cantab.net, hch@infradead.org, viro@zeniv.linux.org.uk Return-path: To: Glauber de Oliveira Costa Content-Disposition: inline In-Reply-To: <20051011000734.GC13399@br.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Oct 10, 2005 at 09:07:34PM -0300, Glauber de Oliveira Costa wrote: > if (!bh) > return -EIO; > new = sb_getblk(sb, to); > + if (!new) > + return -EIO; You've just introduced a leak here, obviously. Please, read the code before "fixing" that stuff; slapping returns at random and hoping that it will help is not a good way to deal with that - the only thing you achieve is hiding the problem. The same goes for the rest of patch - in each case it's not obvious that your changes are correct.