From: Trond Myklebust Subject: Re: [PATCH] Backport inode_hash race fix Date: 30 Oct 2003 23:54:42 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: References: <20030814151211.GA15650@ime.usp.br> <1067439222.16018.8.camel@hades.cambridge.redhat.com> <16289.58315.544796.134740@notabene.cse.unsw.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Woodhouse , Livio Baldini Soares , linux-fsdevel@vger.kernel.org, Andreas Dilger Return-path: Received: from pat.uio.no ([129.240.130.16]:46258 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S262955AbTJaEy4 (ORCPT ); Thu, 30 Oct 2003 23:54:56 -0500 To: Neil Brown In-Reply-To: <16289.58315.544796.134740@notabene.cse.unsw.edu.au> List-Id: linux-fsdevel.vger.kernel.org >>>>> " " == Neil Brown writes: > unhash an inode *after* it has been cleared > If we unhash the inode earlier, and new inode may be allocated > before an old copy of the same inode is properly cleared, and > races can ensue in some filesystem. Huh? Aren't all inodes that call dispose_list() supposed to be in the I_FREEING state? Surely the correct fix here should be to provide a proper test of the flags in inode->i_state rather than some ad-hoc reordering of inode unhashing vs. freeing... Cheers, Trond