Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262017AbUKDAQd (ORCPT ); Wed, 3 Nov 2004 19:16:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262007AbUKDAMu (ORCPT ); Wed, 3 Nov 2004 19:12:50 -0500 Received: from fw.osdl.org ([65.172.181.6]:2720 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261997AbUKDAKl (ORCPT ); Wed, 3 Nov 2004 19:10:41 -0500 Date: Wed, 3 Nov 2004 16:10:31 -0800 (PST) From: Linus Torvalds To: Andries Brouwer cc: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] avoid semi-infinite loop when mounting bad ext2 In-Reply-To: <20041103232744.GA10325@apps.cwi.nl> Message-ID: References: <20041103232744.GA10325@apps.cwi.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1173 Lines: 36 On Thu, 4 Nov 2004, Andries Brouwer wrote: > > [no doubt a similar patch is appropriate for ext3] ext3 is different here, and uses the old-style buffer cache rather than page cache. It has the equivalent case for a hole and/or IO error, and like ext2, it just continues with the next block. I _think_ that case should be updated to do the same thing you did for ext2, but I'll leave it up to Andrew, since he is the ext3 master anyway. Andrew? Linus > diff -uprN -X /linux/dontdiff a/fs/ext2/dir.c b/fs/ext2/dir.c > --- a/fs/ext2/dir.c 2004-10-30 21:44:02.000000000 +0200 > +++ b/fs/ext2/dir.c 2004-11-04 00:14:14.000000000 +0100 > @@ -275,7 +275,8 @@ ext2_readdir (struct file * filp, void * > "bad page in #%lu", > inode->i_ino); > filp->f_pos += PAGE_CACHE_SIZE - offset; > - continue; > + ret = -EIO; > + goto done; > } > kaddr = page_address(page); > if (need_revalidate) { > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/